RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.SysGetMem Function

Allocates a specified number of bytes and returns a pointer to them.

Pascal
function SysGetMem(Size: Integer): Pointer;
C++
void * SysGetMem(int Size);

System

When implementing a custom memory manager, use SysGetMem to dynamically allocate Size bytes of memory.

Note: On Windows, the System unit provides a limited implementation of SysGetMem. If the custom memory manager needs to support reference counting and objects that can be shared between processes, use the implementation of SysGetMem provided by the ShareMem unit. When used, ShareMem must be the first unit in the project file, to enforce a consistent memory management model.
Note: On Linux, the System unit provides an implementation of SysGetMem that supports reference counting and shared objects. The ShareMem unit is not provided for Linux.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!