-
Difference between revisions of "Functions HI-TECH C MALLOC"
From HI-TECH C for CP/M Fan WIKI(EN)
(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...") |
(No difference)
|
Latest revision as of 22:25, 31 July 2017
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