CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    37

    MTS stack-overflow

    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.

  2. #2
    Join Date
    Apr 1999
    Posts
    37

    Re: MTS stack-overflow

    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.

  3. #3
    Join Date
    Apr 1999
    Posts
    27

    Re: MTS stack-overflow

    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.




  4. #4
    Join Date
    Apr 1999
    Posts
    37

    Re: MTS stack-overflow

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured