Manual Page Search Parameters
MEMORY(3) Library Functions Manual MEMORY(3)

aligned_alloc, alloca, calloc, free, malloc, posix_memalign, realloc, reallocf, valloc, mmap, munmapmemory management functions

Standard C Library (libc, -lc)

#include <stdlib.h>

void *
aligned_alloc(size_t alignment, size_t size);

void *
alloca(size_t size);

void *
calloc(size_t nelem, size_t elsize);

void
free(void *ptr);

void *
malloc(size_t size);

int
posix_memalign(void **ptr, size_t alignment, size_t size);

void *
realloc(void *ptr, size_t size);

void *
reallocf(void *ptr, size_t size);

void *
valloc(size_t size);

#include <sys/types.h>
#include <sys/mman.h>

void *
mmap(void * addr, size_t len, int prot, int flags, int fd, off_t offset);

int
munmap(void *addr, size_t len);

These functions allocate and free memory for the calling process. They are described in the individual manual pages.

mmap(2), aligned_alloc(3), alloca(3), calloc(3), free(3), malloc(3), posix_memalign(3), realloc(3), reallocf(3), valloc(3)

The calloc(), free(), malloc(), and realloc() functions conform to ISO/IEC 9899:1990 (“ISO C90”).

The mmap(), munmap(), and posix_memalign() functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

October 18, 2023 dev