If you want to find out things such as amount of free dynamic heap, largest
free chunk and the total size of the dynamic heap then this might be useful:
There is a Mem* API, MemHeapFreeBytes that will give you what you want.
You will need to iterate through the heaps and check to see if it is a dynamic
heap and then keep a count of the free bytes.
Pseudo code:
GetFreeMemory
numCards = MemNumCards
for cardNo = 0, less than numCards
for i = 0, less than MemNumRAMHeaps
heapID = MemHeapID(cardNo, i)
if !MemHeapCheck
if MemHeapDynamic
// heapFree is total free space, max is largest free chunk
MemHeapFreeBytes(heapID, &heapFree, &max)
totalFree += heapFree
totalSize += MemHeapSize // find the heaps total size + header
return totalFree
end
Hopefully that helps.
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/