- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In porting a UNIX fortran code to PC Windows I have run into a stack overflow problem. I am using CVF 6.
It seems a variable that is "SAVE"ed(explicit SAVE or by default) alwaysends up on the heap rather than the stack. But it seems that a variable that is not SAVEd (explicit or by default) may end up on the heap or the stack. Is this correct?
Is there a way to force the compiler to SAVE allvariables (i.e., place them on the heap rather than the stack) without making changes to the source code?
In the CVFmanual it very clearly describes what variables are SAVEd by default. I can find no similar discussion of which variables are placed on the heap and which are placed on the stack. Is there such a discussion available?
Steve's article on stack problems (link broken) recommends using allocatable arrays to reduce stack usage and further says allocatable arrays are automatically deallocated upon routine exit unless explicitly SAVEd. This implies that any allocatable variables must always end up onthe heap rather than the stack. Is this true?
Steve'sarticle suggests that passing noncontiguous arrays may lead to stack problems and refers to Chris Boyd's article in Newsletter I. Is there acurrent link available for this article?
Thanks for any clarifications or ideas for identifying the possible reasons for my stack overflow.
Randy
Link Copied
- 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
- 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
There's no real harm in setting a large stacksize, but stack comes out of your process address space which is limited to 2GB on 32-bit versions of Windows, so I don't recommend going crazy here.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page