Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-01 14:13:58


From: "David Bergman" <davidb_at_[hidden]>

> Dave,
>
> There is no need to cool me; I appreciate that Carlos tool will be used
> in memory critical situations, and that there could be reasons to be
> cautious with memory allocation.
>
> I do not want a Boost.Demangle to use allocator parameters without at
> least a discussion.

That's fine, and it's a lot different from calling for "someone with
muscle" to step in so that "we can have tools that do what [you think] they
are supposed to do".

> I saw a proposal using streams, which at least would void the need to do
> the "external" allocation for the string object. The internal memory
> management, necessary for the demangling process, is a different story.
> Unfortunately, stack allocation, as suggested by someone, would probably
> not be a good choice; the debugging might be needed in tight stack
> situations, such as deep recursions.

On lots of platforms, the stack and heap come out of the same pool, so
there's no distinguishing "tight heap" from "tight stack".

> The *only* solution I see is to preallocate memory for internal
> purposes, no matter what target platform and processor architecture; I
> might need some further insight here, since you said there are lots of
> possible approaches.

Well, allocators could be used to make preallocated memory available, if
that's your preferred solution. As I said before, I'm not convinced it's
the right answer, but I don't see why it's neccessarily wrong (yet),
either.

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk