Mercurial > hg > graal-compiler
comparison src/share/vm/memory/universe.cpp @ 6736:11fb740ce98f
7196103: NPG: Unable to allocate bit map for parallel garbage collection for the requested heap size
Summary: Don't allocate huge class metaspace size by default on x64
Reviewed-by: stefank, jmasa, kvn
author | coleenp |
---|---|
date | Fri, 07 Sep 2012 16:42:25 -0400 |
parents | aed758eda82a |
children | 2a48c84f1d04 |
comparison
equal
deleted
inserted
replaced
6735:aed758eda82a | 6736:11fb740ce98f |
---|---|
856 | 856 |
857 // Reserve the Java heap, which is now the same for all GCs. | 857 // Reserve the Java heap, which is now the same for all GCs. |
858 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) { | 858 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) { |
859 // Add in the class metaspace area so the classes in the headers can | 859 // Add in the class metaspace area so the classes in the headers can |
860 // be compressed the same as instances. | 860 // be compressed the same as instances. |
861 size_t total_reserved = heap_size + ClassMetaspaceSize; | 861 size_t total_reserved = align_size_up(heap_size + ClassMetaspaceSize, alignment); |
862 char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); | 862 char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); |
863 | 863 |
864 ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr); | 864 ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr); |
865 | 865 |
866 if (UseCompressedOops) { | 866 if (UseCompressedOops) { |