2 ms·
My Java is rusty, does Java provide things like placement new that make using arenas ergonomic?
by cozzyd 4y ago
My Java is rusty, does Java provide things like placement new that make using arenas ergonomic?
- chii 4y agono, you cannot control allocation via regular means. What i meant is that you make pooling in java, and that effectively makes it work like an arena allocator (in that you end up setting a bit/boolean flag to allocate/deallocate an object). But the pooling can be constrained to just one portion of your app - the hot loop or the bit that needs the low latency. The remaining code - loading resources at startup for example - can just be regular old java that's easy to write.
- chopin 4y agoPooled JDBC connections work this way in Java.