RFR(S) 8055289: Internal Error: mallocTracker.cpp:146 fatal error: Should not use malloc for big memory block, use virtual memory instead

Zhengyu Gu zhengyu.gu at oracle.com
Fri Aug 29 18:23:14 UTC 2014


Native Memory Tracking uses bit field for malloc size, it uses 30 bits 
(1GB-1) on 32-bit system and 62 bits ((1<<62)-1) bytes on 64-bit system, 
which is not an issue.

Although, JVM does not have such large malloc, but it is possible to 
request >= 1GB malloc on 32-bit system via Unsafe API.

The solution is to return NULL for such malloc request when NMT is enabled.


Bug: https://bugs.openjdk.java.net/browse/JDK-8055289
Webrev: http://cr.openjdk.java.net/~zgu/8055289/webrev.00/ 
<http://cr.openjdk.java.net/%7Ezgu/8055289/webrev.00/>


Thanks,

-Zhengyu


More information about the hotspot-runtime-dev mailing list