Libraryless. Click here for Pure Java version (4194L/24K/82K).
1 | !7 |
2 | |
3 | sclass Small {
|
4 | O pointer; |
5 | } |
6 | |
7 | static int instances = oneMegabyte_int(); |
8 | |
9 | p {
|
10 | print("Size for 1-pointer-object: " + exclusive_measureSizeOfObject(instances, () -> new Small));
|
11 | print("JavaX guessed: " + unsafe_sizeOf(new Small));
|
12 | } |
Began life as a copy of #1018913
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1032627 |
| Snippet name: | Measure memory size of small object (1 pointer field) - should be 16, not 24? |
| Eternal ID of this version: | #1032627/5 |
| Text MD5: | f01406ed7e6b049b528e8942cffa7178 |
| Transpilation MD5: | 39ae240b75dd556736c95560cf742dfb |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-09-29 21:12:31 |
| Source code size: | 249 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 423 / 548 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |