DragonFly kernel List (threaded) for 2005-02
Re: phk malloc, was (Re: ptmalloc2)
:Jonathan Dama wrote:
:> If you put 'Z' into your malloc option strings, malloc will
:> touch all of the allocated pages for you.
:Will this cause malloc to guarantee that it, or the OS will actually
:make the requested amount of physical memory available to such a process,
:and never give them back to the OS as long as the process is reusing
:that memory, and not calling any allocation functions after this memory
Dan, this guarenteed memory stuff comes up every few months pretty much
every since I ever started working with UNIX. I have yet to see a single
program that would benefit from it. Not one. The answer is: libc
has no support for it because 99.9% of the programs that exist in this
world have no use for it and would not benefit from it. If you want
total control over the backing store for a program's memory there is
nothing stopping you from writing your own malloc wrapper to wire the
memory or to use a file-backed mmap or something like that.
The plain fact of the matter is that for any system where it matters,
the person running the program will set a datasize limit or the program
itself will be self-regulating.