This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 other/50636] GC in large LTO builds cause excessive fragmentation in memory map


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50636

--- Comment #15 from ak at gcc dot gnu.org 2011-10-17 14:43:45 UTC ---
Author: ak
Date: Mon Oct 17 14:43:37 2011
New Revision: 180093

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180093
Log:
Use MADV_DONTNEED for freeing in garbage collector

Use the Linux MADV_DONTNEED call to unmap free pages in the garbage
collector.Then keep the unmapped pages in the free list. This avoid
excessive memory fragmentation on large LTO bulds, which can lead
to gcc bumping into the Linux vm_max_map limit per process.

gcc/:

2011-10-08  Andi Kleen  <ak@linux.intel.com>

    PR other/50636
    * config.in, configure: Regenerate.
    * configure.ac (madvise): Add to AC_CHECK_FUNCS.
    * ggc-page.c (USING_MADVISE): Add.
    (page_entry): Add discarded field.
    (alloc_page): Check for discarded pages.
    (release_pages): Add USING_MADVISE branch.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.in
    trunk/gcc/configure
    trunk/gcc/configure.ac
    trunk/gcc/ggc-page.c


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