--- a/hotspot/src/share/vm/memory/universe.cpp Fri Sep 07 12:04:16 2012 -0400
+++ b/hotspot/src/share/vm/memory/universe.cpp Fri Sep 07 16:42:25 2012 -0400
@@ -858,7 +858,7 @@
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);