Comment by foobarchu

Comment by foobarchu 9 months ago

0 replies

ByteBuffers and direct memory make it possible.

https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffe...

But it is a pain and only really useful if you have a big, long lived object. In my case it was loading massive arrays into memory for access by the API server frontend. They needed to be complete overwritten once an hour, and it turns out that allocating 40% of system memory then immediately releasing another 40% back to the GC at once is a good recipe for long pauses or high CPU use