News for hackers. Stuff that matters.
Re:Taming Go’s memory usage, or how we avoided rewriting our... by pjc50 on Tuesday September 21, 2021 @03:39PM (#28608979)
You can also kind of do your own management of memory in GC languages, you just have to be extremely careful in code review to spot inadvertant allocations in the hot path. A great example is the "LMAX Disruptor" in Java: https://lmax-exchange.github.io/disruptor/

The trick is to pre-allocate all your objects and buffers and reuse them in a ring buffer. Similar techniques work in zero-malloc embedded C environments.

There are no comments on this comment yet.