You can adjust some parameters for dynamic memory allocation with the
mallopt function. This function is the general SVID/XPG
interface, defined in `malloc.h'.
mallopt, the param argument specifies the parameter to be set, and value the new value to be set. Possible choices for param, as defined in `malloc.h', are:
sbrkto be called with a negative argument in order to return memory to the system.
sbrkis required. It also specifies the number of bytes to retain when shrinking the heap by calling
sbrkwith a negative argument. This provides the necessary hysteresis in heap size such that excessive amounts of system calls can be avoided.
mmapsystem call. This way it is guaranteed that the memory for these chunks can be returned to the system on
mmap. Setting this to zero disables all use of
Go to the first, previous, next, last section, table of contents.