However, if I exit X and immediately reload it, using the same setup files,
the free memory will decrease. I have had the used memory become just about
all of the avaliable memory doing this. If the memory is stored in cache
after exiting for a possible reentry into a program, then when you reenter
that program immedialty upon exiting it, the free memory should not decrease
beyond the point that it was when you had the program running the first time.
Also, when you exit a program, how long should the memory be maintained in
the "cache"??? If you exit a program and and leave the system (say over
night) the cache does not decrease. Yet it seems logical that if a user has
not reused the program in say 30 min or 1 hr. that the memory should be
reassigned to the free memory catagory and the cache forgotten.
Therefore, this leads me to believe that there is still a bug in the memory
management area of linux. If I exit the program, free memory should be
increased on the display to near the original amount, even if it is held in
cache (since this is still "unallocated" memory at the momment i.e. it is
not being used by a program). All that the cache needs to carry is just a
hook to where the old memory is at. Then, if the user reenters the program,
the partial load is still their via the tag. However, if the user runs
other programs this memory appear to be available for use (the way it should
be). The user should never see the free memory go to 0 or any where near
that if there is unused memory in the cache. However, this appears to be
precisley what linux will do. While there may be megs of unused memory in
the cache, linux will let the free memory reading of the system to drop down
to 500k or lower. This gives an incorrect reading and can cause the use of
the disk cache. This should not be since there is still free cache memory
and the disk cache is so much slower than having linux start eating into the
cache memory.
BTW, to most people, the term "cache" is interpreted to mean the memory that
is used as a "buffer" to hold the most demanded pages of memory (i.e. disk
cache, L2 cache, etc). However, linux appears to be redefining it with a
definition that is contrary to the usual one.
Chris