Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / context / doc / stack.qbk
1 [/ Copyright Oliver Kowalke 2009.
2  Distributed under the Boost Software License, Version 1.0.
3     (See accompanying file LICENSE_1_0.txt or copy at
4           http://www.boost.org/LICENSE_1_0.txt
5 ]
6
7 [section:stack Stack allocation]
8
9 A __fcontext__ requires a stack which will be allocated/deallocated
10 by a __stack_allocator__ (examples contain an implementation
11 of [@boost:/libs/context/example/simple_stack_allocator.hpp
12 simple_stack_allocator]).
13
14 [note The implementation of a __stack_allocator__ might include logic to protect
15 against exceeding the context's available stack size rather than leaving it as
16 undefined behaviour.]
17
18 [note The stack is not required to be aligned; alignment takes place inside
19 __make_fcontext__.]
20
21 [note Depending on the architecture __stack_allocator__ returns an address from
22 the top of the stack (grows downwards) or the bottom of the stack (grows
23 upwards).]
24
25 [endsect]