Add missing page rounding of a page_entry
commit76f0411d965454c0b994b5d5c0728771e04b3c35
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:01:34 +0000 (29 01:01 +0000)
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:01:34 +0000 (29 01:01 +0000)
tree68feb3c0af7c2a57c894bfbcfdcd0d088cc63d89
parentaa0b463791ef064b269a7f2e3be46953941b5525
Add missing page rounding of a page_entry

This one place in ggc forgot to round page_entry->bytes to the
next page boundary, which lead to all the heuristics in freeing to
check for continuous memory failing. Round here too, like all other
allocators already do. The memory consumed should be the same
for MMAP because the kernel would round anyways. It may slightly
increase memory usage when malloc groups are used.

This will also increase the hitrate on the free page list
slightly.

gcc/:

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

* ggc-page.c (alloc_pages): Always round up to entry_size.

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