SilverScreen Solid Modeler

malloc

malloc

Previous topic Next topic  

malloc

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

void *malloc( size_t size )

 

size_t size;       /* size in bytes of memory requested */

 

 

 




Synopsis

#include "stdlib.h"

 

The malloc function attempts to allocate a piece of memory from the heap large enough to hold an object size bytes in length.

 

 

Parameters

size is an integer greater than zero.

 

 

Return Value

malloc returns a pointer to the beginning of the allocated memory, if successful, and a NULL pointer otherwise.

 

 

Comments

The memory allocated by malloc may be returned to the heap by using free.

 

 

See Also

free , calloc , realloc