OSDN Git Service

Add a fragmentation fallback in ggc-page v2
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:02:14 +0000 (01:02 +0000)
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:02:14 +0000 (01:02 +0000)
commit4a2f812eeb7192c01faef17a3e0fa324f5faff33
treeeb03fae09ae19353a8f309e094443984ebd18f82
parente8b7c6129e3b158a97c39a3213a58b40eb47f1b4
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180649 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ggc-page.c