- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using Intel Fortran 11 with Visual Studio.
I am having a problem that I am not able to allocate an array. Since the array is large and I already have several other big arrays stored before I try to allocate itI was wondering whetherI could somehow monitor memory usage using the debugger.
Is there a way to see how many bytes each array is occupying as the code progresses using the debugger?
Many thanks,
Rafael
I am using Intel Fortran 11 with Visual Studio.
I am having a problem that I am not able to allocate an array. Since the array is large and I already have several other big arrays stored before I try to allocate itI was wondering whetherI could somehow monitor memory usage using the debugger.
Is there a way to see how many bytes each array is occupying as the code progresses using the debugger?
Many thanks,
Rafael
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, if you have suggestions of what I could do in order to be able to allocate this large array, please let me know. Before anyone suggests, I did increase both the heap-arrays and the Stack Reserve options in the IDE to very big numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rafael,
Open MSDN help and enter in "heap". There are many functions available and there is a debug version of the heap. Note, IFV uses the CRTL heap. Of particular interest you might start with heapwalk.
Often the problem you are experiencing is due to one or the other of these reasons
1) too much memory allocated
2) heap memory gets fragmented due to allocate/deallocate sequencing
allocate big array
| big array |
allocate little thing
| big array |x|
deallocate big array
| (free)|x|
allocate other little thing
|y| (free)|x|
allocate big array
|y| (free)|x| big array |
This creates a series of not quite large enough free blocks
3) memory leak. Usualy in Fortran this is caused by allocating to pointer then forgetting to deallocate.
Also, search MSDN for LFH or "Low Fragmentation Heap". You may need to enable this.
Jim Dempsey

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