|
|
|
|
|
by astrange
1644 days ago
|
|
There's more than just the stack/heap - in a compiled language your constant data is file backed and doesn't need to contribute to memory footprint at all. Java doesn't have that because jar files are missing it (being zipped, syntax that looks like it creates them emit heap allocation bytecode, etc.) and it doesn't have multidimensional arrays or things that might help you use it even if you wrote it in C. There's some other tricks like tagged pointers, purgeable data it doesn't reliably have either. |
|
I’ve read that games and simulators schedule realtime asset loading pretty carefully; what other problems are solved using large constant data?