Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.4.pdf
Скачиваний:
31
Добавлен:
23.08.2013
Размер:
2.79 Mб
Скачать

Miscellaneous Library Functions

11.3memman.c

The ARM networking software uses the two functions npalloc() and npfree() to make dynamic memory allocations. In systems that include the standard C library, these can be mapped directly onto calloc() and free() using defined macros in the ipport.h file.

If you are experiencing memory allocation problems and suspect that memory blocks are being referenced after they have been freed, or that data is being written beyond the end of the allocated area, you may be able to use the npalloc() and npfree() functions implemented in memman.c to help with debugging. If you are using these functions, you may also use the diagnostic function blocklist() which uses dprintf() to print a list of the memory blocks currently in use.

11-16

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

ARM DUI 0079B

Miscellaneous Library Functions

11.4menus.c, menulib.c, and nrmenus.c

These three files contain functions that implement a menu system that can be readily extended as new modules are added to a project. The menu system is intended to run with your application code, and allows you to exercise different areas of the network protocols. The menus can be accessed either by way of the standard input and output channels, or by way of a TELNET socket or other GenericIO channel.

ARM DUI 0079B

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

11-17