hotspot/src/share/vm/services/mallocTracker.cpp
changeset 26925 c77fdcf78eeb
parent 25946 1572c9f03fb9
child 27162 0a4a7276949b
--- a/hotspot/src/share/vm/services/mallocTracker.cpp	Wed Sep 24 09:49:47 2014 +0200
+++ b/hotspot/src/share/vm/services/mallocTracker.cpp	Thu Sep 25 07:52:32 2014 -0400
@@ -140,11 +140,6 @@
     return NULL;
   }
 
-  // Check malloc size, size has to <= MAX_MALLOC_SIZE. This is only possible on 32-bit
-  // systems, when malloc size >= 1GB, but is is safe to assume it won't happen.
-  if (size > MAX_MALLOC_SIZE) {
-    fatal("Should not use malloc for big memory block, use virtual memory instead");
-  }
   // Uses placement global new operator to initialize malloc header
   switch(level) {
     case NMT_off:
@@ -154,10 +149,12 @@
       break;
     }
     case NMT_summary: {
+      assert(size <= MAX_MALLOC_SIZE, "malloc size overrun for NMT");
       header = ::new (malloc_base) MallocHeader(size, flags);
       break;
     }
     case NMT_detail: {
+      assert(size <= MAX_MALLOC_SIZE, "malloc size overrun for NMT");
       header = ::new (malloc_base) MallocHeader(size, flags, stack);
       break;
     }