- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have IVF 2008 Version 9.0 complier.
Recently, I run into stack overflow problem. The problem went away with either increasing the stack sizeor using heap array compiler option. My question is that if we are going to distribute theexecutibles to end users, which option we should choose, increasing stack size or using heap array compiler option? We know that heap array option makes the program 5% slower for certain cases and no significant slow down for most our cases.
Any cons if we increase the stack size while making executibles? I mean what if someone's memory is much smaller than our specified stack size, will it cause problems? I am asking since the recommendation is to use heap array compiler option and I just want to know why.
Thanks, Maria
Recently, I run into stack overflow problem. The problem went away with either increasing the stack sizeor using heap array compiler option. My question is that if we are going to distribute theexecutibles to end users, which option we should choose, increasing stack size or using heap array compiler option? We know that heap array option makes the program 5% slower for certain cases and no significant slow down for most our cases.
Any cons if we increase the stack size while making executibles? I mean what if someone's memory is much smaller than our specified stack size, will it cause problems? I am asking since the recommendation is to use heap array compiler option and I just want to know why.
Thanks, Maria
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is unlikely that you would be setting the stack size high enough to pose a problem for your users, unless you "go crazy" with it, but there is the possibility that you don't set it high enough and a stack error will happen. This is why I generally recommend /heap-arrays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
Just want to make sure that I understand your recommendation. You said that 'I generally
recommend /heap arrays'. Does this mean that in general /heap arrays is better when you
are not sure the size? If you 100% sure about temp array size, you may increase stack size only without losing the speed. Is this a true statement? One more question, canI do /heap arrays and increasing stack size at the
same time? What will happen if I do this? Sorry that I don't totally understand stack and help size, so I am asking all these entry level questions.
Maria
Just want to make sure that I understand your recommendation. You said that 'I generally
recommend /heap arrays'. Does this mean that in general /heap arrays is better when you
are not sure the size? If you 100% sure about temp array size, you may increase stack size only without losing the speed. Is this a true statement? One more question, canI do /heap arrays and increasing stack size at the
same time? What will happen if I do this? Sorry that I don't totally understand stack and help size, so I am asking all these entry level questions.
Maria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you don't absolutely know how much stack you're going to need, /heap-arrays is a win. This is especially true with 64-bit applications where the stack is limited to 1GB just as it is on 32-bits.
Yes, if you set the stack reserve size high enough for your program to run, you won't lose any performance.
As for doing both - you can, but with /heap-arrays enabled, the use of the stack will be much lower.
You may want to read Doctor Fortran - Don't Blow Your Stack!
Yes, if you set the stack reserve size high enough for your program to run, you won't lose any performance.
As for doing both - you can, but with /heap-arrays enabled, the use of the stack will be much lower.
You may want to read Doctor Fortran - Don't Blow Your Stack!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I don't find the article in your link.
I don't find the article in your link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry - I should have linked to the specific post. Fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting maria
...I mean what if someone's memory is much smaller than our specified stack size, will it cause problems?...
Yes.An applicationwon't be able to allocate a requested memory block and it will exit or even crash at a startup.
Best regards,
Sergey
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