Hi Everybody, I know that windows allocates 1Mb of stack for each theard, but when I try to use local variables (using LOCAL) larger than 8Kb (I don't know the exact size) the program crashes. This happens both in windows 9x and NT. Does anyone know why this happens ?
Posted on 2001-07-01 15:48:00 by titanium
what is your initial thread stack size? (Parm 2 of CreateThread) try to increase that value the guard page mechanism of "Win32" only guards the "next" page of the stack. if esp is jumping over that page due to the size of local variables, your app may crash. to be sure, try: /stack:0x100000,0x100000 as parameter to the linker and set parameter 2 of every CreateThread() to Zero.
Posted on 2001-07-01 16:32:00 by japheth