> http://www.openbsd.org/papers/eurobsdcon2009/otto-malloc.pdf
> On the page 17 it says that  "Regions free'ed are kept for later reuse."
> I have a long living program which do alot of malloc and free. I want
> free'ed memory to be returned back to the OS. How can i do that?  is there
> any equivalent function like malloc_trim in openBSD?

No, and there never will be such a non-standard function.

But don't worry.  Only small amounts of free memory are kept around as
a cache, for performance reasons.  The other randomization safety
ideas mentioned in the paper are also applied when reusing out of this
cache.

Reply via email to