http://bxr.su/OpenBSD/lib/libc/stdlib/malloc.c#omalloc
^Not the CVS repo, but close enough for those who want to check OpenBSD's malloc implementation. The malloc.conf manpage is also an interesting read : http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/...
And some context around malloc and the various techniques OpenBSD implements to make exploitation of bugs more difficult: http://www.openbsd.org/papers/dev-sw-hostile-env.html
The tl;dr is : if your code compiles and runs on OpenBSD, chances are it will fine on other Unices. The opposite is not necessarily true though.
I don't think that source refutes the parent's point: only large allocations go directly to mmap/munmap as opposed to being cached. Of course, there are other anti-exploitation measures too...
Re:Being Sneaky in C
by icebraining on Friday June 12, 2015 @03:18PM
(#9707976)
Here's the CVS repo: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib...
Do you have a URL to a git ... hahaha, pardon me, CVS repo?