Query: alloc
OS: hpux
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
alloc(3) Library Functions Manual alloc(3)NAMEalloc - allocate memorySYNTAX#include <alloc.h> char *alloc(new); void alloc_free(x); void alloc_re(&x,old,new); char *x; unsigned int old; unsigned int new;DESCRIPTIONalloc allocates enough space from the heap for new bytes of data, adequately aligned for any data type. new may be 0. alloc returns a pointer to the space. If space is not available, alloc returns 0, setting errno appropriately. alloc_free returns space to the heap. alloc_re expands the space allocated to x from old bytes to new bytes. It allocates new space, copies old bytes from the old space to the new space, returns the old space to the heap, and changes x to point to the new space. It then returns 1. If space is not available, alloc_re returns 0, leaving the old space alone.SEE ALSOsbrk(2), malloc(3), error(3) alloc(3)
Related Man Pages |
---|
mallinfo(3) - linux |
dynarr(3pub) - debian |
mallinfo(3) - debian |
malloc(2) - plan9 |
mallinfo(3) - redhat |
Similar Topics in the Unix Linux Community |
---|
question regarding multithreading and malloc() requests |
array dynamic allocation |
Free PP Allocation problem |
realloc() fails |
*** glibc detected *** ./a.out malloc() memory corruption |