Re: Stack Overflow
- From: "Jacky Luk" <jl@xxxxxxxxxx>
- Date: Wed, 16 Aug 2006 18:30:21 +0800
As I wouldn't be distributing the dll out, I think I would try the first
option first. But I do wonder
how to set the DLL's stack size?
I don't see any other options like that in the IDE...
Thanks
Jack
"Bruno van Dooren [MVP VC++]" <bruno_nos_pam_van_dooren@xxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:%23cFuUqRwGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
I meant all those switches /stack:200000,200000 like that
Thanks
Jack
http://msdn2.microsoft.com/en-US/library/8cxs58a6.aspx
/stack:2000000 sets the stack size to 2 MB
Note that this only works for executables. If your recursion is done
inside your dll, then the exe that uses the
dll has to specify the stack size, not the dll itself. this might be
problematic if your dll is meant for distribution.
In that case there is also another option:
start the recursion function in your dll in a separate thread, and wait
until the thread is finished.
this has the same effect as starting your recursion directly, but you can
specify the stack size of the new thread.
That way you do not depend on the calling executable.
--
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"
.
- Follow-Ups:
- Re: Stack Overflow
- From: Bruno van Dooren [MVP VC++]
- Re: Stack Overflow
- From: Alex Blekhman
- Re: Stack Overflow
- References:
- Stack Overflow
- From: Jacky Luk
- Re: Stack Overflow
- From: Jacky Luk
- Re: Stack Overflow
- From: Bruno van Dooren [MVP VC++]
- Re: Stack Overflow
- From: Jacky Luk
- Re: Stack Overflow
- From: Jacky Luk
- Re: Stack Overflow
- From: Bruno van Dooren [MVP VC++]
- Stack Overflow
- Prev by Date: Re: existence of path
- Next by Date: Re: need Windows getch()
- Previous by thread: Re: Stack Overflow
- Next by thread: Re: Stack Overflow
- Index(es):
Relevant Pages
|