Markus1201 Posted May 17, 2016 Report Share Posted May 17, 2016 Hello!I'm using Visual Studio 2015 to simulate my design. When it reaches aspecific size, it throws an exception due to dereferencing aNULL-pointer inside SwitchToFiber. Is there a way to tweak the settingssomehow, to get around this limitation? Also it would be nice to addsome more asserts to catch the error, when creating the Fiber actuallyfails. best regards Markus Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted May 17, 2016 Report Share Posted May 17, 2016 Do you mean you've reached a maximum possible fibers limit? According to MS documentation: https://msdn.microsoft.com/en-us/library/ms682402%28VS.85%29.aspx The number of fibers a process can create is limited by the available virtual memory. For example, if you create each fiber with 1 megabyte of reserved stack space, you can create at most 2028 fibers. If you reduce the default stack size by using the STACKSIZE statement in the module definition (.def) file or by using CreateFiberEx, you can create more fibers. So you have two options: Increase virtual memory. If you are compiling for 32bit , try switching into 64 bit. Decrease stack size. Try to decrease stack size using set_stack_size method (Check SystemC LRM for documentation). Also it would be nice to add some more asserts to catch the error, when creating the Fiber actually fails. I agree. Unfortunately there is no SystemC bugtracker to track such requests. So our best hope is that someone from SystemC committee will read this thread and add error checking to CreateFiber call. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.