Functions HI-TECH C MALLOC

Revision as of 22:25, 31 July 2017 by Kumokosi (talk | contribs) (Created page with "<strong>MALLOC</strong> ==SYNOPSIS== #include <stdlib.h> void * malloc(size_t cnt) ==DESCRIPTION== <strong>Malloc</strong>() attempts to allocate cnt bytes of memory...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MALLOC

SYNOPSIS

#include  <stdlib.h>

void * malloc(size_t cnt)


DESCRIPTION

Malloc() attempts to allocate cnt bytes of memory from the "heap", the dynamic memory allocation area. If successful, it returns a pointer to the block, otherwise 0 is returned. The memory so allocated may be freed with free(), or changed in size via realloc(). Malloc() calls sbrk() to obtain memory, and is in turn called by calloc(). Malloc() does not clear the memory it obtains.

SEE ALSO

calloc, free, realloc