Return the memory the allocator keeps for reuse to the OS: this thread's cached blocks go back to their slabs, and every slab with no live block is released, including the slab each size class is currently carving blocks from, as is the committed but unused end of the bump region. Blocks cached by other threads count as live; they go back when those threads exit. Without trim(), a slab that becomes empty is kept for reuse until it has been empty for a quarter of a second (checked whenever a slab becomes empty) or more than 64 MiB of empty slabs are kept.