changeset 7835:ad10a46cc215

8072434: 8064457: introduces performance regressions in 9-b47 Reviewed-by: coleenp, kvn
author goetz
date Wed, 04 Feb 2015 16:26:38 +0100
parents 623d0a89d55d
children 9c3b4e28183c
files src/share/vm/runtime/virtualspace.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/virtualspace.cpp	Thu Feb 05 12:54:34 2015 +0100
+++ b/src/share/vm/runtime/virtualspace.cpp	Wed Feb 04 16:26:38 2015 +0100
@@ -503,11 +503,12 @@
     // But leave room for the compressed class pointers, which is allocated above
     // the heap.
     char *zerobased_max = (char *)OopEncodingHeapMax;
+    const size_t class_space = align_size_up(CompressedClassSpaceSize, alignment);
     // For small heaps, save some space for compressed class pointer
     // space so it can be decoded with no base.
     if (UseCompressedClassPointers && !UseSharedSpaces &&
-        OopEncodingHeapMax <= KlassEncodingMetaspaceMax) {
-      const size_t class_space = align_size_up(CompressedClassSpaceSize, alignment);
+        OopEncodingHeapMax <= KlassEncodingMetaspaceMax &&
+        (uint64_t)(aligned_heap_base_min_address + size + class_space) <= KlassEncodingMetaspaceMax) {
       zerobased_max = (char *)OopEncodingHeapMax - class_space;
     }