Stack Commit size? Reserve size?


  • In linux, it is straight forward in changing stack size, but in VS, even though I changed both size to 2gb but still have difficulties to set double type 10^7 size of array. As I understand each double takes 8bytes, 8x10^7/1024/1024 = MB only. And there are bunch of threads related this questions but I couldn't find the answer yet. 

    Let me know what is the maximum size of single array I can set up in double type.


    Friday, March 11, 2016 10:44 PM


  • Hi ThimasK79,

    Thanks for your post.

    Could you please tell me some more about your question?

    As far as I know, the /STACK option sets the size of the stack in bytes. You can use this option only when you build an .exe file.

    The reserve value specifies the total stack allocation in virtual memory. For x86 and x64 machines, the default stack size is 1 MB. On the Itanium chipset, the default size is 4 MB.

    In addition, Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.

    If your issue is about Stack Commit size, please refer to the following document about /STACK (Stack Allocations) :

    If I misunderstood your question, please feel free to let me know.

    Best Regards,

    Lake Xiao

    Monday, March 14, 2016 5:30 AM