3 ms·
never allocating memory can be and should be simple.
by anonymoushn 4y ago
never allocating memory can be and should be simple.
- bpye 4y agoWhat language actually makes it simple?
- anonymoushn 4y agoIn Zig, we are writing a moderately complex application that calls mmap many times in the first few seconds and never thereafter. We can use every part of the stdlib and most libraries because we can pass in allocators backed by the memory we reserved at startup.
- jedisct1 4y agoZig, definitely.
- ncmncm 4y agoThis is very commonly done in C++. My programs do a flurry of mmaps in the first second, then run for, sometimes, years without allocating again.