8

I need to increase the default stack size on 32-bit Windows 7 ultimate.As I know there are two ways to increase stack size on Linux, executing command " ulimit -s size " and changing limits.conf file. Is there some similar method for Windows 7 operating system ?

Pedja
  • 183
  • 1
  • 1
  • 4
  • What are you trying to accomplish with this? – Moab Sep 27 '11 at 03:35
  • 4
    most of the time when i see "i need to do x" its just that the person does not know how to fix the real problem and just wants to sidestep it. so, whats your real problem (the one that leads you to think to increase the stacksize permanently)? – akira Sep 27 '11 at 03:36
  • related: http://stackoverflow.com/questions/156510/increase-stack-size-on-windows-gcc – akira Sep 27 '11 at 03:39
  • @akira,I am trying to run a one test in Maple 14 but I am getting following message "Error, numeric exception: overflow" – Pedja Sep 27 '11 at 03:42
  • so, also related http://stackoverflow.com/questions/7554111/how-to-avoid-numeric-exception-overflow-in-maple-14 :) – akira Sep 27 '11 at 03:51
  • @pedja: i dont think that increasing the stacksize helps with the calculation problem. you are working with pretty big numbers there and an overflow just means that the range for that number does not suffice, eg you can not put 257 bits into one byte .. simple example: calculate (128 + 129 - 100). depending on how you order it you will get either an overflow or not: (128 + 129) = 257 (overflow) vs 128 + (129 - 100). also check out http://www.mapleprimes.com/questions/38293-25689--Error-Numeric-Exception-Overflow – akira Sep 27 '11 at 03:55
  • @akira,expressions that I am testing are using very big numbers and I can't change mathematics representation.Any idea how to solve problem ? – Pedja Sep 27 '11 at 04:03
  • @pedja: if maple chokes on these numbers than maple might be the wrong tool for the job. other than: try to reorder / regroup the calculation (see my small example). – akira Sep 27 '11 at 04:52

1 Answers1

8

changing the stacksize for a program can be changed by using the editbin command (part of visual studio):

$ editbin /STACK:reserve[,commit] program.exe

See https://docs.microsoft.com/en-us/cpp/build/reference/stack

Arnavion
  • 103
  • 4
akira
  • 61,009
  • 17
  • 135
  • 165