2 // Copyright Oliver Kowalke 2014.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
10 #include <boost/config.hpp>
12 #include <boost/coroutine2/all.hpp>
14 #ifdef BOOST_MSVC //MS VisualStudio
15 __declspec(noinline) void access( char *buf);
17 void access( char *buf) __attribute__ ((noinline));
19 void access( char *buf)
31 std::cout << i << ". iteration" << std::endl;
39 std::cout << "using segmented_stack stacks: allocates " << count << " * 4kB == " << 4 * count << "kB on stack, ";
40 std::cout << "initial stack size = " << boost::context::segmented_stack::traits_type::default_size() / 1024 << "kB" << std::endl;
41 std::cout << "application should not fail" << std::endl;
43 boost::coroutines2::coroutine< void >::push_type sink(
44 [&]( boost::coroutines2::coroutine< void >::pull_type & source) {
51 std::cout << "main: Done" << std::endl;