This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, Jul 31, 2012 at 03:34:03PM +0200, Florian Weimer wrote:On 07/31/2012 03:27 PM, Rich Felker wrote:
I think this is about the third or forth time I've explained it now. PROT_NONE is needed to actually free the memory for other processes to use. MADV_DONTNEED frees the physical memory (eliminates dirty pages and thus prevents costly swapping of worthless data), but it does not free the commit charge because the pages are still potentially writable and thus not permanently backed by the zero page even though they initially just reference it.
Good catch. Do you know if this is part of the kernel ABI these days? Last time I checked, it was not documented behavior, so I feared that it was an accident of implementation.
Which part are you talking about? The subtracting from commit charge?
Assuming your definition of commit charge for a process is the minimum amount of memory that must be reserved for it to make overcommit impossible (with no further assumptions on the process's behavior), omitting non-writable cleanly-backed mappings from the commit charge accounting is just part of the definition of commit charge.
-- Florian Weimer / Red Hat Product Security Team
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |