Sign in Join
FPDoc Onlineexperiment

Malloc function

In unit cmem

Malloc external declaration.

Declaration

pascal
function Malloc(Size: PtrUInt): Pointer

Arguments

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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.