Knowing When to Let Go: Better Living Through Memory Management
Subject:   Re: What about preallocated memory?
Date:   2003-06-11 16:26:16
From:   iapole
Response to: What about preallocated memory?

Agreed, definitely. Because you're working within a simpler domain than e.g. the whole system, you don't have to worry about all the stuff that the malloc/free developers had to, so you can avoid some overhead.

Of course, there's no real substitute for good design in this sort of matter. You won't get as many benefits from preallocation if your preallocated memory has to be accessible concurrently by several threads, for instance, so planning ahead is (as always) advisable.