logoalt Hacker News

Aardappel • yesterday at 9:53 PM • 0 replies • view on HN

You typically "allocate only" if a data structure is made entirely on construction, or if its growth is bounded.

If it is potentially completely unbounded, you need different solutions like a pool, or essentially reconstructing etc.