Add a fragmentation fallback in ggc-page v2
authorAndi Kleen <ak@linux.intel.com>
Sat, 29 Oct 2011 01:02:14 +0000 (01:02 +0000)
committerAndi Kleen <ak@gcc.gnu.org>
Sat, 29 Oct 2011 01:02:14 +0000 (01:02 +0000)
commit25f0ea8135b221a7d560e9062d30d14be33c5582
treeeb03fae09ae19353a8f309e094443984ebd18f82
parentd33ef9a52bb4a561ec8fb14ad4f45c68dc57bc72
Add a fragmentation fallback in ggc-page v2

There were some concerns that the earlier munmap patch could lead
to address space being freed that cannot be allocated again
by ggc due to fragmentation. This patch adds a fragmentation
fallback to solve this: when a GGC_QUIRE_SIZE sized allocation fails,
try again with a page sized allocation.

Passes bootstrap and testing on x86_64-linux with the fallback
forced artificially.

v2: fix missed initialization bug added in last minute edit.

gcc/:
2011-10-20  Andi Kleen  <ak@linux.intel.com>

* ggc-page (alloc_anon): Add check argument.
(alloc_page): Add fallback to 1 page allocation.
Adjust alloc_anon calls to new argument.

From-SVN: r180649
gcc/ChangeLog
gcc/ggc-page.c