User: Password:
|
|
Subscribe / Log in / New account

KS2007: Memory management & application notification of low memory

KS2007: Memory management & application notification of low memory

Posted Sep 16, 2007 19:43 UTC (Sun) by oak (guest, #2786)
In reply to: KS2007: Memory management & application notification of low memory by nix
Parent article: KS2007: Memory management

> The glibc mmap threshold *minimum* is 128Kb. In recent versions of glibc
the threshold is dynamically adjusted [...] (This is new behaviour in
glibc 2.5.)

Can you still limit that to be smaller with MALLOC_MMAP_THRESHOLD_
environment variable? This would indicate that the limit just increases
and never decreases, regardless of the environment variable:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/malloc/...

However, in some environments and with some applications, the memory
fragmentation is actually worse problem than some performance decrease. If
a device (e.g. an embedded one where you cannot just add more RAM) runs
out of memory because of heap fragmentation, that's going to have much
more drastic effect on performance than e.g. threading scalability
mentioned here:
http://sourceware.org/bugzilla/show_bug.cgi?id=1541


(Log in to post comments)

KS2007: Memory management & application notification of low memory

Posted Sep 16, 2007 23:11 UTC (Sun) by nix (subscriber, #2304) [Link]

MALLOC_MMAP_THRESHOLD_ still works: it's precisely equivalent to calling
mallopt (M_MMAP_THRESHOLD, ...); setting any of these mmap parameters
disables dynamic adjustment completely.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds