This is the mail archive of the glibc-bugs@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]

[Bug libc/11770] New: Per thread memory allocator uses too much address space


The first allocation made on a thread calls into _int_new_arena which in turn 
calls new_heap which in turn reserves address space for the thread heap using 
mmap. On 64-bit platforms, the default size of this heap (as set by 
HEAP_MAX_SIZE) is 64mb. When many threads are created the amount of address 
space used by the process grows quickly.

Normally this is not a problem, but when the process is run with a restricted 
address space (via ulimit -v) the limit gets hit sooner than seems reasonable. 
Some distributions (SuSE) are known to set a default address space limit to 80% 
of physical ram + swap. 

On 32-bit platforms the default value of HEAP_MAX_SIZE is 1mb because the 
available address space is limited to 32-bit addressing. Perhaps a smaller value 
of HEAP_MAX_SIZE should also be used if the address space of the process is 
limited by resource limits.

-- 
           Summary: Per thread memory allocator uses too much address space
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: nauch at sybase dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11770

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]