Minimum String memory usage in java 6

27 Views Asked by At

I read the article string_memory_usage, then I have a question. What is 45 made of?
I list what I know:

  • for round up to the next multiple of 8 => 7 bytes
  • 3 int field => 3 * 4 = 12bytes
  • char array reference => 4byte
  • string object header => 8bytes
  • 1 char array => at least 12 bytes for object header

Add all of the above is 43bytes.The remaining 2 is what?

0

There are 0 best solutions below