Skip to content

Malloc

Malloc external declaration.

Declaration

Source position: cmem.pp line 65

function Malloc(Size: PtrUInt) : Pointer; cdecl;external LibName name 'malloc';

Arguments

Name Description
Size Requested size for the new memory block.

Function result

A pointer to the newly allocated memory block.

Description

Malloc is the external declaration of the C libraries malloc call. It accepts a size parameter, and returns a pointer to a memory block of the requested size or Nil if no more memory could be allocated.

See also

Name Description
Free Free a previously allocated block.
ReAlloc Reallocates a memory block.