7196103: NPG: Unable to allocate bit map for parallel garbage collection for the requested heap size

Don't allocate huge class metaspace size by default on x64

Reviewed-by: stefank, jmasa, kvn
This commit is contained in:
Coleen Phillimore 2012-09-07 16:42:25 -04:00
parent 12b9a4edbb
commit 6fda647450
4 changed files with 24 additions and 8 deletions

View file

@ -858,7 +858,7 @@ jint Universe::initialize_heap() {
ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
// Add in the class metaspace area so the classes in the headers can
// be compressed the same as instances.
size_t total_reserved = heap_size + ClassMetaspaceSize;
size_t total_reserved = align_size_up(heap_size + ClassMetaspaceSize, alignment);
char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop);
ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr);