Page 1 of 1

Why I new 1024 bytes memory, in fact used 1036 bytes?

Posted: Thu Aug 27, 2015 5:33 am
by monter001
I use JCIDE to debug Applet.
First, I find the NVM memory is 0x00035D10; and I new a 1024 bytes memory, there only remain 0x00035904, that means I used 1036 bytes memory.

The previous memory is:


When I used " byte[] buffer = new byte[1024]; ", the remaining memory is:



Why?

Re: Why I new 1024 bytes memory, in fact used 1036 bytes?

Posted: Fri Aug 28, 2015 3:54 am
by rena2019
because it also has to store the reference to the array - not only the array itself

Re: Why I new 1024 bytes memory, in fact used 1036 bytes?

Posted: Sat Aug 29, 2015 11:05 pm
by UNKNwYSHSA
Additional informations of array, array length, array element type, and others.