This option 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.
....
And if I create a new Win32 application I find: /STACK:0x10000 that is
64536.
Does anyone have an idea?
The default stack size for CE is 64K. And that should be plenty for most
applications. And CE virtual memory is very precious (you get 32MB for your
process). Setting it higher just eats up the address space. If you have
large items you're putting on the stack, think about dynamically allocating
those items instead.
--
Michael Salamone
Entrek Software, Inc.
www.entrek.com
"Enrico Trombetta" <winceit_...@yahoo.it> wrote in message
news:#DHiSyLN...@TK2MSFTNGP11.phx.gbl...
"Michael J. Salamone" <mik...@entrek.com> ha scritto nel messaggio
news:%23U4BJRW...@TK2MSFTNGP10.phx.gbl...
I would contact whoever provided the library and see if you can get a change
in.
If you are stuck with that library, then the only alternative would be to
build a new process with stacksize=1MB. And then do some IPC between the
device driver and the new process. That may or may not be practical for
your driver/system, but that would be it.
There are actually two "hack" approaches - that may or may not work - I
haven't tested them.
1) Allocate additional stack before you invoke anything in the library. You
could get the stack base address (just take the address of a stack variable
and call VirtualQuery to get allocation base, size). Then call VirtualAlloc
with a base address which is allocation base+64K (and size to be 1MB-64K -
that for a total 1MB stack). May not work for a couple reasons. First, the
addresses following the stack may already be allocated/reserved (in which
case VirtualAlloc would fail), and second, when handling page guard
exception, the system may not grow the stack beyond the original limits.
You'd have to test to verify - or read the shared source code.
2) Swap the stack. I.e. create an entirely new stack and set the thread to
use the new stack (using SetThreadContext). This may not work for some of
the reasons mentioned above (VirtualAlloc failure, system handling).
--
Michael Salamone
Entrek Software, Inc.
www.entrek.com
"Enrico Trombetta" <winceit_...@yahoo.it> wrote in message
news:#Ss89BXN...@TK2MSFTNGP10.phx.gbl...
1) alt+f7 this brings up build option sheet
2) go to linker tab
3) select output...
4) here u can specify stack size and commit size
5) i stick to stack size of 5mb and commit size of 1mb
chk out on u r side..
eVC3.0 PPC for x86,ARM on Win2K professional...