3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Class stack_context
</title>
5 <link rel=
"stylesheet" href=
"../../../../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.75.2">
7 <link rel=
"home" href=
"../../../index.html" title=
"Chapter 1. Context">
8 <link rel=
"up" href=
"../stack.html" title=
"Stack allocation">
9 <link rel=
"prev" href=
"stack_traits.html" title=
"Class stack_traits">
10 <link rel=
"next" href=
"valgrind.html" title=
"Support for valgrind">
12 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF">
13 <table cellpadding=
"2" width=
"100%"><tr>
14 <td valign=
"top"><img alt=
"Boost C++ Libraries" width=
"277" height=
"86" src=
"../../../../../../../boost.png"></td>
15 <td align=
"center"><a href=
"../../../../../../../index.html">Home
</a></td>
16 <td align=
"center"><a href=
"../../../../../../../libs/libraries.htm">Libraries
</a></td>
17 <td align=
"center"><a href=
"http://www.boost.org/users/people.html">People
</a></td>
18 <td align=
"center"><a href=
"http://www.boost.org/users/faq.html">FAQ
</a></td>
19 <td align=
"center"><a href=
"../../../../../../../more/index.htm">More
</a></td>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"stack_traits.html"><img src=
"../../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../stack.html"><img src=
"../../../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../../../index.html"><img src=
"../../../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"valgrind.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h4 class=
"title">
27 <a name=
"context.abstract_context.stack.stack_context"></a><a class=
"link" href=
"stack_context.html" title=
"Class stack_context">Class
28 <span class=
"emphasis"><em>stack_context
</em></span></a>
29 </h4></div></div></div>
31 <span class=
"bold"><strong>Boost.Context
</strong></span> provides the class
<span class=
"emphasis"><em>stack_context
</em></span>
32 which will contain the stack pointer and the size of the stack. In case
33 of a
<span class=
"emphasis"><em>segmented_stack
</em></span>,
<span class=
"emphasis"><em>stack_context
</em></span>
34 contains some extra control structures.
36 <pre class=
"programlisting"><span class=
"keyword">struct
</span> <span class=
"identifier">stack_context
</span>
37 <span class=
"special">{
</span>
38 <span class=
"keyword">void
</span> <span class=
"special">*
</span> <span class=
"identifier">sp
</span><span class=
"special">;
</span>
39 <span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">size_t
</span> <span class=
"identifier">size
</span><span class=
"special">;
</span>
41 <span class=
"comment">// might contain additional control structures
</span>
42 <span class=
"comment">// for segmented stacks
</span>
43 <span class=
"special">}
</span>
46 <a name=
"context.abstract_context.stack.stack_context.h0"></a>
47 <span><a name=
"context.abstract_context.stack.stack_context._code__phrase_role__keyword__void__phrase___phrase_role__special_____phrase___phrase_role__identifier__sp__phrase___code_"></a></span><a class=
"link" href=
"stack_context.html#context.abstract_context.stack.stack_context._code__phrase_role__keyword__void__phrase___phrase_role__special_____phrase___phrase_role__identifier__sp__phrase___code_"><code class=
"computeroutput"><span class=
"keyword">void
</span> <span class=
"special">*
</span> <span class=
"identifier">sp
</span></code></a>
49 <div class=
"variablelist">
50 <p class=
"title"><b></b></p>
52 <dt><span class=
"term">Value:
</span></dt>
54 Pointer to the beginning of the stack.
59 <a name=
"context.abstract_context.stack.stack_context.h1"></a>
60 <span><a name=
"context.abstract_context.stack.stack_context._code__phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase___code_"></a></span><a class=
"link" href=
"stack_context.html#context.abstract_context.stack.stack_context._code__phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase___phrase_role__identifier__size__phrase___code_"><code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">size_t
</span> <span class=
"identifier">size
</span></code></a>
62 <div class=
"variablelist">
63 <p class=
"title"><b></b></p>
65 <dt><span class=
"term">Value:
</span></dt>
67 Actual size of the stack.
72 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
73 <td align=
"left"></td>
74 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2014 Oliver Kowalke
<p>
75 Distributed under the Boost Software License, Version
1.0. (See accompanying
76 file LICENSE_1_0.txt or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt" target=
"_top">http://www.boost.org/LICENSE_1_0.txt
</a>)
81 <div class=
"spirit-nav">
82 <a accesskey=
"p" href=
"stack_traits.html"><img src=
"../../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../stack.html"><img src=
"../../../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../../../index.html"><img src=
"../../../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"valgrind.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>