--- old/src/hotspot/share/runtime/os.cpp 2019-03-28 08:34:36.230847624 +0100 +++ new/src/hotspot/share/runtime/os.cpp 2019-03-28 08:34:35.854841368 +0100 @@ -704,12 +704,15 @@ // Wrap memory with guard GuardedMemory guarded(ptr, size + nmt_header_size); ptr = guarded.get_user_ptr(); -#endif + if ((intptr_t)ptr == (intptr_t)MallocCatchPtr) { log_warning(malloc, free)("os::malloc caught, " SIZE_FORMAT " bytes --> " PTR_FORMAT, size, p2i(ptr)); breakpoint(); } - debug_only(if (paranoid) verify_memory(ptr)); + if (paranoid) { + verify_memory(ptr); + } +#endif // we do not track guard memory return MemTracker::record_malloc((address)ptr, size, memflags, stack, level);