From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function GetHeapStatus: THeapStatus;


extern DELPHI_PACKAGE THeapStatus __fastcall GetHeapStatus _DEPRECATED_ATTRIBUTE0 (void);


Type Visibility Source Unit Parent
function public
System System


Warning: GetHeapStatus is deprecated.

Returns the current status of the memory manager.

GetHeapStatus returns the current status of the memory manager in a THeapStatus type. If the ShareMem unit is not included in the current project, GetHeapStatus returns information about the global heap. If the ShareMem unit is included, GetHeapStatus returns information about memory that can be shared between the current project and other binary modules (such as DLLs) that also make use of the ShareMem unit. GetHeapStatus can only return useful information if the built-in memory manager is used. For example, when using CodeGuard, the memory manager is replaced and GetHeapStatus always returns nil (Object Pascal) or NULL (C++).

If you want information about the memory manager that is shared between modules, make sure to call the function GetHeapStatus provided in the ShareMem unit. The function GetHeapStatus in the System unit returns no values for a project that uses shared memory.

Note: Because GetHeapStatus is deprecated, use the GetMemoryManagerState routine instead.

Warning: ShareMem must be the first unit included in the project file to prevent mixing of memory management models.

See Also