This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12463] New: Allow M_ARENA_MAX / MALLOC_ARENA_MAX limit even with PER_THREAD disabled
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 4 Feb 2011 01:46:02 +0000
- Subject: [Bug libc/12463] New: Allow M_ARENA_MAX / MALLOC_ARENA_MAX limit even with PER_THREAD disabled
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12463
Summary: Allow M_ARENA_MAX / MALLOC_ARENA_MAX limit even with
PER_THREAD disabled
Product: glibc
Version: 2.13
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: pasky@suse.cz
Created attachment 5226
--> http://sourceware.org/bugzilla/attachment.cgi?id=5226
proposed patch
With the new PER_THREAD compile-time option, the allocator also offers
a way to limit the total number of arenas using MALLOC_ARENA_MAX
environment variable or mallopt(M_ARENA_MAX).
In principle, this feature is not tied to the PER_THREAD option. The attached
patch makes it possible to use it even with the default compilation
settings.
One motivation to limit the number of arenas may be libhugetlbfs users
that rely on its __morecore hook providing hugetlbfs-backed memory for
the allocator - this can work only with a single arena and multi-threaded
programs wishing to use this feature need a way to limit the allocator
to a single arena. Another motivation is avoiding pathological behavior
in extremely thread-intensive applications.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.