[Ace-users] [ace-users] ACE_Allocator and ACE_NEW

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Fri Nov 30 12:45:31 CST 2007


Hi Martin,

To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in

$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM

or in

$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM

in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers
to.

> I've created my own memory allocator based on ACE_New_Allocator for a
> real time system. I aim for using the real time memory manager without
> calling new (ACE_NEW, ...) anymore. A first test with an
> ACE_Unbounded_Stack, ... was succesfull.
>
> Now I've recognised that beside the allocator strategy ACE_NEW is
> still used in many classes. e.g. in ACE_String_Base ...
>
> All those ACE_NEW calls will bypass my allocator.

Right - not all of ACE has been designed to have user-defined allocators.  

> Can you tell we how to handle this?

I can see two ways to do this:

. Change all of ACE to support user-defined allocators.  This will
  take a LOT of work.
  
. Overload global operator new and replace it with your allocator.
  This will take less work but may be a bit tricky to get right.

Take care,

     Doug
-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list