- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
2 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla