- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can CVF use ALLOCATE to get memory from the stack instead of the heap? If not, is there any other way to get stack memory for a structure?
Stack memory would be very efficient for some temporary structures that we would like to create in a subroutine, and pass to a "C" routine where it will be copied. The allocated memory can be removed automatically from the stack when returning from the original Fortran subroutine.
Eddie
Stack memory would be very efficient for some temporary structures that we would like to create in a subroutine, and pass to a "C" routine where it will be copied. The allocated memory can be removed automatically from the stack when returning from the original Fortran subroutine.
Eddie
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ALLOCATE is for heap only. See the manual for "automatic arrays" - this is what you want.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve!
Eddie
Eddie

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