- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
I was hoping someone here might recall how to increase the stack size in good ol' Compaq Visual Fortran (Version 6.6). I'm getting a stack overflow error when dealing with some big matrices. I'm compiling and linking from within Visual Studio so I need to find where to raise the stack from within the menus or options within that environment, rather than from the command line. I'm sure there's a wayto handle this in Visual Studio, but the Release Notes only give the command line syntax and it's been years since I did anything from there.
I'd be grateful for any assistance!
Cheers,
Bert
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From VS project properties | Linker | System | Stack Reserve Size (and/or Stack Commit Size)
Your VS properties windows may differ somewhat (mine is VS 2010).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's "Stack Reserve Size".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry -- I still can't find it. Do you mean (from menus) Project/Settings -> Link tab ? If so, there is no "System" listed in "Categories" there, and I don't see anything related to the Stack Reserve size. I must be on the wrong track. My Visual Studio is 2000 or 2002, I think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah !! There it is -- thank you! If I may followup -- The value now appearing for Reserve is 0x3d0900, which is a rather oblique format to me. What kind of value would I enter to incrementally increase the reserve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's hexadecimal - 4000000 in decimal. You can just enter a decimal number - try 10000000 to start and bump it up 5 million at a time as needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gotcha. However, bumping it up all the way to 30M didn't rectify the overflow problem, which I assume is attributable to some other programming error, What seems like a minor change in array size is resulting in the overflow. Just to be sure, once a change is made to the reserve size, is there anything else that needs to be done to ensure that the change "takes"? I used the "Rebuild All" option but perhaps there's something else required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - just a relink should do it. Can you identify the statement where the error is occurring? You can set the stack reserve as high as 1GB if you want - don't go any higher. Maybe start with 100M.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page