> Hi!
> I would like to start my new engine using console friendly data structures
> and memory handling.
> Can someone help me with any tip? What allocation schemes do you use?
> A large buffer that is handled like a stack? Or you can use, without
> problems, lots of new/delete?
> I would like to implement a new/delete handler to track all memory
> allocations but in this way all memory should be dynamically allocated...
> (not a good idea for consoles I fear).
I would say that considering the small amount of memory
we have on console, you cannot really afford to loose
memory for trivial things. So instead of having a lot
of small new/deletes (each one coming with some memory
overhead: block chaining information...), you should
instead allocate large chunks of memory, and use placement
new (if using C++) in those blocs.
The end result will be a gain in speed (during allocation
and deallocation phase), and a gain in memory if you manage
to allocate exactly what you need.
Mickael Pointier
|