[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dynamic memory allocation approaches for C++ apps - pros and cons
- Date: Fri, 30 Nov 2007 18:43:36 -0500
- From: rsg at alum.mit.edu (Robert S. Grimes)
- Subject: Dynamic memory allocation approaches for C++ apps - pros and cons
Hi,
I'm just looking for some advice and pointers here - no specific
problems (yet!)...
What are the relative pros and cons of the various available dynamic
memory allocation approaches in modern RTEMS applications? One choice
is the C++ operators new/delete, which presumably call malloc and free
under the covers. What are the characteristics wrt determinism,
fragmentation, etc.?
What about the alternatives - regions and partitions? Excuse me if I'm
way off base here, but are these still in use? (I seem to remember
reading something about them being obsolete, but I can't confirm that.)
It would seem that partitions would be ideal for dealing with fixed-size
(or nearly fixed ;-) ) requests. Is it safe to assume that this is the
ideal choice for this sort of application?
How about Regions? All I've seen is a note that freeing memory is
O(constant). Is this the way to go?
What about the Heap itself?
Thanks,
-Bob