简体   繁体   中英

java memory usage outside heap memory

I have java heap size setting max/min defined as 8 GB . System memory is 14 GB .There is no other java process running other than tomcat . I see java using approx 12 GB and hence system goes down . What kind of other things which are consuming more than 4 GB outside of java heap permsize is 256 mb only .

For a 32 bit JDK, Total virtual memory address is 4G size. Ignoring Kernel space at MAX 3G can be used by java and native heap. In-case of 64 bit JDK virtual memory address is infinite. System memory you mentioned is RAM size. System memory and virtual memory are different. Java heap will not expand than specified -Xmx value. If Xmx is set to 8GB it will not expand further when it reaches 8GB and if application did not find space for allocation then java will throw OutOfMemory exception.

I got the answer . Our application was using bytearray which consumes outside heap and hence the difference in behavior .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM