mirror of
https://github.com/boostorg/coroutine.git
synced 2026-01-30 19:52:18 +00:00
coroutine: fixing export issue for MSVC; increase used stacksize for example
[SVN r85979]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user