System.SysGetMem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SysGetMem(Size: NativeInt): Pointer;

C++

extern DELPHI_PACKAGE void * __fastcall SysGetMem(NativeInt Size);

Properties

Type Visibility Source Unit Parent
function public
GETMEM.INC
System.hpp
System System

Description

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

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

Note: 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 in order to enforce a consistent memory management model.

Warning: This is an internal function and should not be called directly by any application. Use the GetMem function instead.

See Also