简体   繁体   中英

byte[] and char[] on NetBeans Profiler

I'm running NetBeans Profiler in my application and byte[] and char[] occupy approximately 90% of the memory allocated. My entity, beans, service, etc., don't occupy 2%.

Do you know why or it can be some NetBeans Profiler's mistake?

Thanks a lot.

This is probably not a mistake, since the underlying object is char[] or byte[] in many case. For example - the size of a String object will be shown as very small even for large String s, as the String object actually contains a char[] , who is the actual big allocation.

Take a look at the OpenJDK implementation . Not a big object at all, but contains a possibly huge char[] .

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