Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::memory::GetHeapMemStatsEx Function
C++
MEM_PROC void MEM_API GetHeapMemStatsEx(PMEM pHeap, _32 * pFree, _32 * pUsed, _32 * pChunks, _32 *pFreeChunks DBG_PASS);
#define GetHeapMemStats(h,f,u,c,fc) GetHeapMemStatsEx( h,f,u,c,fc DBG_SRC )
Parameters 
Description 
PMEM pHeap 
pointer to a heap 
_32 * pFree 
pointer to a 32 bit value to receive the size of free space 
_32 * pUsed 
pointer to a 32 bit value to receive the size of used space 
_32 * pChunks 
pointer to a 32 bit value to receive the total count of chunks. 
pFreeChunks 
pointer to a 32 bit value to receive the total count of free chunks. 

It looks like DBG_PASS parameter isn't used... not sure why it would here, there is no allocate or delete. 

The count of allocated chunks can be gotten by subtracting FreeChunks from Chunks.

_32 free;
_32 used;
_32 chunks;
_32 free_chunks;
GetHeapMemStatsEx( NULL, &free, &used, &chunks, &free_chunks );
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!