HeapSize Function (ROM Call 0x9E)

alloc.h

unsigned long HeapSize (HANDLE Handle);

Determines the size of an allocated block.

HeapSize returns the number of bytes allocated for the heap block referenced by Handle. Due to word alignment and minimum block size, this may not be the amount it was allocated with. Also note that because of locked blocks, it is possible (rare) that a heap block will actually be bumped up a few words by the HeapCompress routine. So never assume that the value returned by HeapSize is the true number of bytes used by the data stored in the heap block.


Used by: DialogAdd, FClose, FPutC, fopen, EM_moveSymFromExtMem, EM_moveSymToExtMem, EM_twinSymFromExtMem, FindProgramVar, ROM Call 0x438