Closed skalarproduktraum closed 1 year ago
I thought that direct memory didn't count toward the JVM heap limit?
Not towards the heap limit, but there's an additional limit for direct buffers: https://stackoverflow.com/questions/3773775/default-for-xxmaxdirectmemorysize
@skalarproduktraum Wow, that is so weird. Normally, I'd point out that using jemalloc would be less cross-platform than using direct memory, and therefore to be avoided... but since scenery and sciview are already tied down platform-wise, I guess the benefits outweigh the disadvantages. Do you ever expect to support any platforms other than Windows, MacOS and Linux? In particular, will Scenery work on Raspberry Pi? Will jemalloc? People have specifically asked about Fiji + 3D viz on Pi in the past with Java 3D; see here for a short summary of (lack of) known status there. It would be a shame if our next-generation 3D viz solution still can't do it.
There's no reason jemalloc shouldn't work on ARM. That being said, lwjgl at the moment is x64-only. Regarding the memory allocators, jemalloc is also just one option in lwjgl, an the system allocator can always be used as a fallback, it's just that jemalloc is usually much more efficient.
This might be relevant to imagej-mesh as well.
I believe this is more or less resolved.
We should use e.g. jemalloc for allocating mesh storage, as for large meshes, the JVM will run out of memory.