Release address space to the OS at gencgc_release_granularity
authorPaul Khuong <pvk@pvk.ca>
Sun, 3 Jul 2011 16:45:42 +0000 (12:45 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sun, 3 Jul 2011 16:45:42 +0000 (12:45 -0400)
commit87cce4bfe714163f5ab7d211f439db567c7278d1
treea727de4b687d338e22a85936262d8a340174080a
parent5c0a884190d6c98448d86fb05e1e99df901c9bf8
Release address space to the OS at gencgc_release_granularity

 * Some platforms perform better on large, aligned mmap/munmap calls.
   The GC will only perform such calls in chunks of
   gencgc_release_granularity bytes, aligned at that many bytes.

 * gencgc_release_granularity defaults to GENCGC_RELEASE_GRANULARITY,
   and should always be a power of 2, as well as a multiple of the OS
   page size and of GENCGC_CARD_BYTES.

 * GENCGC_RELEASE_GRANULARITY defaults to BACKEND_PAGE_BYTES, making
   this patch a no-op.

 * Also, fix an assumption that BACKEND_PAGE_BYTES = 1024*sizeof(long)
   in a safety check in gc_free_heap.
src/runtime/gencgc.c