Boost logo

Boost :

From: Carlo Wood (carlo_at_[hidden])
Date: 2002-09-03 19:16:16

On Tue, Sep 03, 2002 at 12:28:45PM -0400, Rob Stewart wrote:
> The problem here, then, is that demangle() might cause a recursive call to
> malloc() in a naive implementation. Therefore, you propose providing an
> allocator for demangle() to use with its internal STL code, right? It is also

Yes, although naive is not the word; either you try to demangle things
from within malloc or you don't, and I do.

> my understanding that your use of STL containers, for example, is to collect and
> cache symbol translations in order to improve performance.


> Let's start with the assumption that an allocator is needed. I'm left to wonder

It is :/

> what such an allocator can do. Someone else just raised the question of what
> the memory allocation scheme of that allocator should be? Is it just a general
> purpose function not unlike malloc()? If so, then the demangle() client will
> need to supply OS-specific private heap code in the form of std::allocator to
> give you what you need. That's a pretty tall order for most folks -- perhaps
> for you, too.

It seems you don't know what an allocator is. It is a template parameter
that is passed to the STL containers.

The rest of your mail is off-topic as it is based on your misunderstanding
of the subject.

Carlo Wood <carlo_at_[hidden]>

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