Hacker News new | ask | show | jobs
by vvanders 2232 days ago
You should do this in both GC'd and non-GC'd languages. Obviously C/C++/etc give you more options for arenas and the like. If you have a well bounded upper limit there's a while lot of good reasons to preallocate(locality of data, GC pressure, etc).

Some engines I used to work with would assert() on malloc/free if it happened outside certain safe regions of execution.