Click to See Complete Forum and Search --> : MTS stack-overflow
reverse
May 17th, 1999, 10:40 PM
I have made up a MTS/COM object.
But it occurrs critical error in some cases.
STACK OVERFLOW !!
How to configurate stack size of MTS/COM?
I know DLL's stack size is depend on main process's.
Unfortunetely, it's main process is mtx.exe...
A programmer who loves Goethe.
A programmer who loves Goethe.
reverse
May 18th, 1999, 01:01 AM
I asked this question , in the end, I'm posting the answer.
----------------
All MTS component's thread has only 256KB stack as a default. It's defined in mtx.exe, which stack size is fixed as such.
In order to change this default, I have sought many development sites in 24 hours.
But, I knew it's solution is very simple.\
I found this from VC++ online help.
There is an utility, EDITBIN.EXE.
This allows you to configure EXE file's stack size.
Somehow this method is expedient.
But, I can't find another better solution.
EDITBIN /STACK:1048767 mtx.exe
Then, all MTS' thread would have 1MB stack.
You should beware of resource waste.
A programmer who loves Goethe.
leolin@
May 18th, 1999, 03:37 AM
why not change the compile option to
put the stack size
The Stack Allocations (/STACK:reserve[,commit]) option sets the size of the stack in bytes.
To find this option in the development environment, click Settings on the Project menu. Then click the Link tab, and click Output in the Category box. The Reserve text box (or in the reserve argument on the command line) specifies the total stack allocation in virtual memory. The default stack size is 1 MB. The linker rounds up the specified value to the nearest 4 bytes.
reverse
May 19th, 1999, 09:16 PM
Thanks for your reply.
But, can you change DLL's stack size in such way?
I'm sorry that I don't think so.
A programmer who loves Goethe.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.