--- old/src/share/vm/services/mallocTracker.cpp 2014-09-24 18:18:44.700212000 -0400 +++ new/src/share/vm/services/mallocTracker.cpp 2014-09-24 18:18:43.999764000 -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; }