Boost logo

Boost :

Subject: Re: [boost] [context] Windows ctx::maximum_stacksize() runtime asserts
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-02 01:38:06


Am 02.09.2012 01:33, schrieb Hartmut Kaiser:
> Hey all,
>
> The Windows implementation of boost::ctx::maximum_stacksize() does always
> assert:
>
> std::size_t maximum_stacksize()
> {
> BOOST_ASSERT( ! is_stack_unbound() );
> static std::size_t stacksize = 8 * 1024 * 1024;
> return stacksize;
> }

the assert statement is a pre-condition of maximum_stacksize().
is_stack_unbound() returns true if the stack is not limited.
calling maximum_stacksize() is only allowed if is_stack_unbound()
returns false.
this is a issue required by posix getrlimit() - the max stacksize to a
certain value or unlimited (== RLIM_INFINITY).

Oliver


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