xmalloc

Allocates a block of memory.

Library:LibC
Classification:Other
Service:Memory Management

Syntax

  #include <xmalloc.h> 
   
  void *xmalloc (
     size_t   size);
  

Parameters

size

(IN) Specifies the size (in bytes) of the memory block.

Return Values

Returns a pointer to the start of the newly allocated memory. If insufficient memory is available, exits and writes a “no memory available” message on stderr.

See Also