Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory usage

Status
Not open for further replies.

Pfor

Technical User
Aug 11, 2010
22
IT
hallo all,
I have written a fortran code and compiled it with gfortran.
I run it and I keep using the computer for other purposes, however
from time to time the computer (fedora 14 core2 duo with a 1Gb) becomes very slow. I was thinking that maybe the memory usage might exceed the available memory thus using a swap file, however "top" never shows memory usage around 99% (even when it is almost stuck the memory usage is at most 70%).
Once the pc was almost unusable but my code was using only 1% of the cpu and rather small amount of memory (my code was the cause of the slowness since when I killed it the pc started working fine again).

My question is:
how do fortran codes use the memory? suppose it needs 2Gb and I have only 1 does it use ~99% of the memory plus a 1Gb swap file, or does it use a small fraction of the memory plus a big amount of swap file?

thanks
cheers,
Paolo

 
This is an OS question: nothing to do with the compiler. The compiler doesn't know where you are going to run the program so it cannot decide on memory issues. It just creates the executable. When you run the executable, the OS loads it and decides what to swap etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top