table of contents
NAME¶
malloc_trim - release free memory from the heap
SYNOPSIS¶
#include <malloc.h>
int malloc_trim(size_t pad);
DESCRIPTION¶
The malloc_trim() function attempts to release free memory from the heap (by calling sbrk(2) or madvise(2) with suitable arguments).¶
The malloc_trim() function returns 1 if memory was actually released back to the system, or 0 if it was not possible to release any memory.
ERRORS¶
No errors are defined.
ATTRIBUTES¶
For an explanation of the terms used in this section, see attributes(7).
CONFORMING TO¶
This function is a GNU extension.
NOTES¶¶
sbrk(2), malloc(3), mallopt(3)
COLOPHON¶
This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at 