Alex Nichol said:
In XP yes it does, provided there is no other more important use around
(which is unlikely). But if you have a RAM drive it will just insert
its cache in between that and your program, thus using RAM twice over.
OK. If, as you say, Windows is going to cache all 600+MB of files in memory
for me when I do a build, then can you tell me why do I see over 600MB of
files being created, yet my memory usage not rise any higher than the
200-250MB normal usage. If it is cacheing all these temporary files, then it
should push the memory usage up to 600MB + the normal 200MB = over 800MB
when I do a large code build? However, it moves no higher than the normal
200-250MB usage during a code generation and I can hear the hard disk
rattling away as the temporary files are written out to disk, then read back
in a few minutes later! Also, if they are cached in memory by the operating
system, then how does it know I have finished doing my build and therefore
delete the cache? There are 21 separate environments built in sequence and
they all refer to some of the temporary files in the other environments.
My understanding is that a cache is there to act as a buffer so that the
operating system does not have to sit around waiting for the hard disk to
save or load data. Any files stored in cache will only exist for a fraction
of a second until the disk catches up. The cache is not there to save
temporary files in RAM for 10-15 minutes so that a manual build procedure
can take advantage of RAM speeds over hard disk speeds!!
These temporary pre-compiled header files and intermediary files ARE written
to and read from the DISK (via a buffer) across 21 different build
environments and over a 10-15 minute period! If I use a RAM disk, then we
REPLACE the need for the hard disk accesses with RAM accesses instead and
the whole process is much faster. The RAM is NOT used twice and the hard
disk is not thrashed as the temporary files are written to a disk which is
based in RAM not in a physical drive.