VxWorks Reference Manual : Libraries
memShow - memory show routines
memShowInit( ) - initialize the memory partition show facility
memShow( ) - show system memory partition blocks and statistics
memPartShow( ) - show partition blocks and statistics
memPartInfoGet( ) - get partition information
This library contains memory partition information display routines. To use this facility, it must first be installed using memShowInit( ), which is called automatically when the memory partition show facility is configured into VxWorks using either of the following methods:
- If you use the configuration header files, define INCLUDE_SHOW_ROUTINES in config.h.
- If you use the Tornado project facility, select INCLUDE_MEM_SHOW.
memShow, memLib, memPartLib, VxWorks Programmer's Guide: Target Shell, windsh, Tornado User's Guide: Shell
memShowInit( ) - initialize the memory partition show facility
void memShowInit (void)
This routine links the memory partition show facility into the VxWorks system. These routines are included automatically when this show facility is configured into VxWorks using either of the following methods:
- If you use the configuration header files, define INCLUDE_SHOW_ROUTINES in config.h.
- If you use the Tornado project facility, select INCLUDE_MEM_SHOW.
N/A
memShow( ) - show system memory partition blocks and statistics
void memShow ( int type /* 1 = list all blocks in the free list */ )
This routine displays statistics about the available and allocated memory in the system memory partition. It shows the number of bytes, the number of blocks, and the average block size in both free and allocated memory, and also the maximum block size of free memory. It also shows the number of blocks currently allocated and the average allocated block size.
In addition, if type is 1, the routine displays a list of all the blocks in the free list of the system partition.
-> memShow 1 FREE LIST: num addr size --- ---------- ---------- 1 0x3fee18 16 2 0x3b1434 20 3 0x4d188 2909400 SUMMARY: status bytes blocks avg block max block ------ --------- -------- ---------- ---------- current free 2909436 3 969812 2909400 alloc 969060 16102 60 - cumulative alloc 1143340 16365 69 -
N/A
memShow, memPartShow( ), VxWorks Programmer's Guide: Target Shell, windsh, Tornado User's Guide: Shell
memPartShow( ) - show partition blocks and statistics
STATUS memPartShow ( PART_ID partId, /* partition ID */ int type /* 0 = statistics, 1 = statistics & list */ )
This routine displays statistics about the available and allocated memory in a specified memory partition. It shows the number of bytes, the number of blocks, and the average block size in both free and allocated memory, and also the maximum block size of free memory. It also shows the number of blocks currently allocated and the average allocated block size.
In addition, if type is 1, the routine displays a list of all the blocks in the free list of the specified partition.
OK or ERROR.
S_smObjLib_NOT_INITIALIZED
memShow( ), VxWorks Programmer's Guide: Target Shell, windsh, Tornado User's Guide: Shell
memPartInfoGet( ) - get partition information
STATUS memPartInfoGet ( PART_ID partId, /* partition ID */ MEM_PART_STATS * ppartStats /* partition stats structure */ )
This routine takes a partition ID and a pointer to a MEM_PART_STATS structure. All the parameters of the structure are filled in with the current partition information.
OK if the structure has valid data, otherwise ERROR.
memShow( )