none
How to increase the user mode driver runtime stack size? RRS feed

  • Question

  • I'm now developing a WEC7 user mode driver (dll) and encounter rumtime stack overflow.

    Adding "STACKSIZE 300000" (change the stack size to 3M) into the module.def file does not help.

    Does anyone know how to increase the WEC7 user mode driver  (dll) runtime stacksize?

    Friday, March 21, 2014 4:43 AM

All replies

  • Hi Guang Bai,

    Do changes as -

    stack:0x1000000, 0x3000000

    or

    stacksize:0x1000000, 0x3000000

    first value is default stack size and second value is what you are going to assign 

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post. 
    Friday, March 21, 2014 5:35 AM
  • Set up following in module.def file still does not work:

    "STACKSIZE 0x100000, 0x100000" (the commit size has to be <= reserved size)

    It seems the overall stack size for the user mode driver dll and the calling apps is still constrained to 64KB.

    Friday, March 21, 2014 6:40 AM
  • Do it as like this

    STACKSIZE 0x2DC6C0 

    2DC6C0 for 3MB.. Do not use codes......

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.

    Friday, March 21, 2014 6:46 AM
  • STACKSIZE in a DEF file has no effect on DLLs, therefore no effect on drivers.

    You may want to adjust stack size when you call CreateThread().

    But, you may want to ask yourself why you need a bigger stack size, and if your architecture is appropriate for an embedded system.


    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Friday, March 21, 2014 1:15 PM
    Moderator
  • None of the suggested solutions resolve my issue. While waiting for new comments, I'll optimize my driver architecture to reduce the unnecessary stack usages.

    Friday, March 21, 2014 4:00 PM
  • What is the issue?  You haven't told us about any issues, only that you want to increase the stack size.

    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Monday, March 24, 2014 12:26 PM
    Moderator