Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-08-21 17:35:02


From: John Max Skaller <skaller_at_[hidden]>
> williamkempf_at_[hidden] wrote:
> >
> > --- In boost_at_y..., John Max Skaller <skaller_at_m...> wrote:
> > > Greg Colvin wrote:
> > >
> > > > And such an animal can also be allocated in terms of alloca()
> > > > or LocalAlloc() or such on systems on which this is a good idea.
> > >
> > > Does alloca() work in C++?
> > > Can you be sure it won't mess generated code, including EH?
> >
> > Are you garaunteed it will? Nope. It works fine for my
> > compiler/platform, however.
>
> You're running Windows: LocalAlloc is actually
> a heap allocation. This is unlikely to mess with EH.
> But unix alloca increments the stack pointer,
> so it is more likely to mess up EH.

It turns out that Windows does support alloca, that it
does allocate from the stack, and that it is safe to
use in C++ so long as you don't call it in a catch
clause expression.


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