Memory
Last updated
/**
* Memory Calculation
* Object Overhead + day + month + year + padding
* 16 + 4 + 4 + 4 + 4 = 32 bytes
*/
public class date {
private int day; // 4 bytes
private int month; // 4 bytes
private int year; // 4 bytes
} /**
* Memory Calculation
* Object Overhead + value + offset + count + hash + padding
* 16 + (8 + 2N + 24) + ( 4 + 4 + 4 ) + 4 = 2N + 64 bytes
*/
public class string {
private char[] value; // Reference to array : 8 + ( 2N + 24 )
private int offset; // 4 bytes
private int count; // 4 bytes
private int hash; // 4 bytes
}