Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2002-09-01 09:43:03

Low memory can be a big issue in debugging code, so I'll
repeat my suggestion that the demangler functions use only
stack-allocated memory.

At 10:52 PM 8/31/2002, Carlo Wood wrote:
>On Fri, Aug 30, 2002 at 01:53:44PM -0400, Thomas Wenisch wrote:
>> I think Daniel has a really good point here. If you really intend to use
>> the demangler in a hard-core debug library (ie debugging code in a
>> memory-constrained embedded system), then it is important that the debug
>> code does not allocate ANY memory or other resources at the time an error
>> is detected - resources/memory need to be reserved in advance.
>> By the same token, I think that it is a LOT of work to get a demangler
>> that only uses pre-allocated memory, and it may not even be possible, so
>> I'm not sure that this should be a design goal of a general-purpose name
>> demangling library. Such a demangler would probably have to be tightly
>> integrated with the rest of your debugging framework (ie stack trace
>> capture without allocating memory, exceptions that use pre-allocated
>> memory, etc). Since this is not the most common use case, IMHO, I believe
>> the extremely low memory situation should not be a primary concern now.
>It is not - the code is already written anyway. And by providing
>the Allocator template argument it will be easy for users to pass on
>an Allocator that uses pre-allocated memory as well. So I think your
>example is only another reason to indeed provide an interface that
>accepts to pass an Allocator type instead of always using the
>Carlo Wood <carlo_at_[hidden]>
>Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at