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/12463] New: Allow M_ARENA_MAX / MALLOC_ARENA_MAX limit even with PER_THREAD disabled


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.


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