3 ms·
Most JVMs take advantage of a thread local "bump" allocator[1] as well to avoid having to cross JVM or kernel boundaries to allocate memory, which can result in
by zackangelo 4y ago
Most JVMs take advantage of a thread local "bump" allocator[1] as well to avoid having to cross JVM or kernel boundaries to allocate memory, which can result in huge speedups for memory-intensive use cases.
[1] https://shipilev.net/jvm/anatomy-quarks/4-tlab-allocation/ https://shipilev.net/jvm/anatomy-quarks/4-tlab-allocation/
- eldenring 4y agoBump allocators are incredibly fast, and are super efficient in generational GCs where compaction is super cheap, however almost all (maybe all) modern languages don't usually cross kernel boundaries when allocating memory, including C++ malloc.