Subj : Re: virtual addresses To : comp.programming From : Randy Howard Date : Wed Sep 28 2005 02:37 am Brian wrote (in article ): > Randy Howard wrote: >> Bill Cunningham wrote >> (in article ): > >>> So the applications and the kernel space do not know what the real >>> physical addresses are then. At least kernel space other than the memory >>> manager? > >> That is typically true for applications (with rare exceptions), >> but drivers and kernel code often know the physical address or >> both, depending on what is being done down low. > >> If you think about it, there really isn't a reason why an >> application needs to know the physical address. > >> In really high-end systems that support failover and RAID memory >> systems, and even 'hot add' of memory to a running system, it is >> extremely advantageous to not have apps tied to physical >> addresses. > > There's one odd thing about virtual memory that is unexplainable. Explaining and comprehending are not the same thing. > Why haven't we outgrown page files / swap files? It was an early > trick and kludge was it not? Because applications constantly want more memory for themselves than is available. Plus, as I indicated above, there are some very good reasons for the existence of virtual addressing, /even if/ you have sufficient physical memory. > My first XP install was on a PIII with 256MB of memory. I suppose > the page file was an additional 256MB. The computer had a practical > upper memory limit of 512MB. All you had to do was use a larger swap file. In fact, if you left XP alone to manage it's own virtual memory, it would have. > I have the same version of XP running on a P4 with 2GB of memory > today. 2GB is approximately 4x my original system's TOTAL available > memory including it's page file. Irrelevant. If you try to load up applications totalling more than 2GB of memory consumption (including OS), then you still need a swap file, or you run the risk of crash-o-rama (ahem). > In other words, I have plenty o' memory without the disk. So why > is the page file still there? Because you don't have enough memory. You *think* you have enough, you can't predict how much memory you will need. On some systems, 16GB of RAM is insufficient. Either way, virtual memory provides some advantages even in cases where you have more physical memory than your peak usage (which you can't ever guarantee). -- Randy Howard (2reply remove FOOBAR) .