Jump to content
Excelsior Forums
bmmv

Stack size in multi-DLL project

Recommended Posts

We have a project composed of several .prj files that generate DLLs and then one that generates an EXE, using those libraries.

We've encountered a StackOverflowError in a portion of our code that uses recursion. We could probably address this issue in a variety of ways, including just using iteration in the first place.

But the question is this: in our multi-.prj setup, if we were going to adjust the -stacklimit or -genstackalloc options, would we need to do so in only the EXE-producing file (as seems intuitive), or in all files? Should these directives even appear in the other, DLL-producing prj files? It seems we currently do have the -genstackalloc+ line in all files.

Share this post


Link to post
Share on other sites

We have a project composed of several .prj files that generate DLLs and then one that generates an EXE, using those libraries.

We've encountered a StackOverflowError in a portion of our code that uses recursion. We could probably address this issue in a variety of ways, including just using iteration in the first place.

But the question is this: in our multi-.prj setup, if we were going to adjust the -stacklimit or -genstackalloc options, would we need to do so in only the EXE-producing file (as seems intuitive), or in all files? Should these directives even appear in the other, DLL-producing prj files? It seems we currently do have the -genstackalloc+ line in all files.

The "genstackalloc" options affects code generation and should be enabled/disabled in the projects files of interest (EXE and DLLs). The "stacklimit" option is, in essence, a run time setting and yes, it's enough to specify it in the EXE's project file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×