coroutine: fixing export issue for MSVC; increase used stacksize for example

[SVN r85979]
This commit is contained in:
Oliver Kowalke
2013-09-28 15:00:26 +00:00
parent 3ad3e2f1a0
commit 2e191b6632
6 changed files with 47 additions and 32 deletions

View File

@@ -11,7 +11,7 @@
#include <boost/coroutine/all.hpp>
#include <boost/thread.hpp>
int count = 50;
int count = 384;
#ifdef BOOST_MSVC //MS VisualStudio
__declspec(noinline) void access( char *buf);
@@ -70,11 +70,11 @@ void thread_fn()
int main( int argc, char * argv[])
{
#if defined(BOOST_USE_SEGMENTED_STACKS)
std::cout << "using segmented stacks: allocates " << count << " * 4kB on stack, ";
std::cout << "using segmented stacks: allocates " << count << " * 4kB == " << 4 * count << "kB on stack, ";
std::cout << "initial stack size = " << boost::coroutines::stack_allocator::default_stacksize() / 1024 << "kB" << std::endl;
std::cout << "application should not fail" << std::endl;
#else
std::cout << "using standard stacks: allocates " << count << " * 4kB on stack, ";
std::cout << "using standard stacks: allocates " << count << " * 4kB == " << 4 * count << "kB on stack, ";
std::cout << "initial stack size = " << boost::coroutines::stack_allocator::default_stacksize() / 1024 << "kB" << std::endl;
std::cout << "application might fail" << std::endl;
#endif