Subject: Re: [boost] Question for C++ experts about exception allocationfailure
From: Adam Badura (abadura_at_[hidden])
Date: 2009-05-17 06:10:22
> GCC allocates exceptions on the heap. If that fails, it will allocate
> them in the emergency storage instead. The emergency storage is a small
> MSVC allocates on the stack.
I am a bit surprised. During compilation it can be checked what is the
maximal size of exception being thrown and preallocate space for it (or
maybe two such to handle throwing from within catch).
This way exception propagation will always succeed unless user uses new
during exception construction (like with Boost.Exception data injection).
But this is done by the user himself/herself so it is up to his/her control
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk