phk malloc, was (Re: ptmalloc2)

Chris Pressey cpressey at catseye.mine.nu
Sat Feb 26 17:16:48 PST 2005


On Sat, 26 Feb 2005 19:32:58 -0500
Tobias DiPasquale <toby at xxxxxxxx> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Feb 26, 2005, at 6:28 PM, Chris Pressey wrote:
> >> And the point we keep coming back to is that it is impossible for
> >an > application to accurately self regulate its resource usage
> >(unless you > mean allowing command line flags to specify how much
> >memory to use > [why  not just set rlimits instead]) since it does
> >not receive > accurate  feedback from the kernel when over commit is
> >allowed.
> >
> > man mlock(1):
> >
> >      [EAGAIN]      Locking the indicated range would exceed either
> >      the
> >                    system or per-process limit for locked memory.
> >
> > Is that not accurate feedback?
> >
> 
> Read more closely: "limit for __locked__ memory". The limits don't
> have  to be (and frequently aren't) the same.

Quoth POSIX:

"Memory residency of unlocked pages is unspecified."

Unspecified means they might be in core, they might be on disk, or they
might not even exist - and is this not the precise nature of overcommit?

-Chris





More information about the Kernel mailing list