Boost logo

Boost :

Subject: Re: [boost] [context] Why does boost::ctx::minimum_stacksize() on Windows return 65536
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-05 17:01:41

Am 02.09.2012 20:27, schrieb Hartmut Kaiser:
>> OK - following suggestion for Windows:
>> minimum_stacksize()/maximum_stacksize() will be static member funcs of
>> class stack_allocator.
>> minimum_stacksize() returns pagesize + 1kB
> Why + 1kb? Shouldn't the guard page have 4k as well?
>> maximum_stacksize() returns 1GB (but will never useable)
>> default_stacksize() returns 64 kB
>> is_stack_unbounded() will always return true for all Windows versions
>> stack_allocator creates a guard page at the lower end of the stack.
>> maximum_stacksize() still has ! is_stack_unbounded() as preconditon -
>> which means you will/can never use the value returned by
>> maximum_stacksize() until I find some informations about those limit in
>> the MSDN (for the several Windows flavours).
>> What do you think?
After some tests I got exceptions thrown by Windows because the stack
was too small (8kB). The simple example 'jump.exe' didn't work. I've
concerns that users of boost.context will complain that their apps do
not work (because of a too small stack) and call boost.context garbage.

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