Name
THeapStatus Type
Syntax
type
THeapStatus = record
TotalAddrSpace: Cardinal;
TotalUncommitted: Cardinal;
TotalCommitted: Cardinal;
TotalAllocated: Cardinal;
TotalFree: Cardinal;
FreeSmall: Cardinal;
FreeBig: Cardinal;
Unused: Cardinal;
Overhead: Cardinal;
HeapErrorCode: Cardinal;
end;Description
The GetHeapStatus function returns a
THeapStatus record. This record provides
information about Delphi’s internal memory manager. If you
install a custom memory manager, all of the heap status values, which
are shown in the following list, will probably be zero.
-
TotalAddrSpace The total number of bytes being managed by the memory manager. Delphi starts out with 1MB of virtual memory. The address space grows as needed:
TotalAddrSpace=TotalUncommitted+TotalCommitted.
-
TotalUncommitted The total number of bytes being managed that have not been allocated space in the swap file.
-
TotalCommitted The total number of bytes being managed that have been allocated space in the swap file:
TotalCommitted=TotalAllocated+TotalFree+Overhead.
-
TotalAllocated The total number of bytes currently allocated and being used by your program.
-
TotalFree The total number of bytes free to be allocated by your program. When the available free memory is too small to fulfill an allocation request, the memory manager gets additional memory from Windows.
TotalFree=FreeSmall+FreeBig+Unused.
-
FreeSmall The total number of bytes in the lists of free small blocks. The memory manager keeps lists of free blocks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access