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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-06 
21:41:41 UTC ---
Right now alloc_page will (usually) allocate in GGC_QUIRE_SIZE * G.pagesize
chunks, but release_pages will munmap individual pages immediately during
collection (well, using one munmap if there are consecutive free pages, but
that is not very likely everything is going to be freed from the whole 1MB
page).
Guess we could do MADV_DONTNEED on the individual pages immediately and if we
have consecutive 1MB region all free, munmap it (or, decide about that based on
how many free pages we have etc.).  I guess doubling GGC_QUIRE_SIZE is
reasonable too.

Reply via email to