- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i tried to write a simple fortran routine that reads a binary file and stores the values in a two-dimensional array. The routine reads the data in a one-dimensional array and afterwards the RESHAPE function rearrange the data. My problem is, that i get some problems with the stack memory. Both arrays are allocated in the heap memory, i dont know if the RESHAPE function generates a temporary array in the stack.
I increased the stack memory in the c++ project settings to solve the problem. Is there a better solution for such a problem?
Thanks, Stephan
i tried to write a simple fortran routine that reads a binary file and stores the values in a two-dimensional array. The routine reads the data in a one-dimensional array and afterwards the RESHAPE function rearrange the data. My problem is, that i get some problems with the stack memory. Both arrays are allocated in the heap memory, i dont know if the RESHAPE function generates a temporary array in the stack.
I increased the stack memory in the c++ project settings to solve the problem. Is there a better solution for such a problem?
Thanks, Stephan
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, RESHAPE often creates a temporary copy on the stack. Increasing the stack size is the only option for now. We know that we have to add the ability to allocate temps on the heap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the quick reply,
Stephan
Stephan

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