Yes, you are wrong. ;)
Approximately: virtual memory systems give a process a chunk of memory that looks to the process like one large contiguous piece of memory. The process can not tell where or how its process space memory is mapped to physical memory. Indeed that mapping may change from access to access. The OS takes care of ensuring that when a process accesses a chunk of process space memory that the access succeeds if possible. That may entail writing a chunk of physical memory to disk, reading another chunk of disk to get the accessed process memory's contents, then fixing up tables to map process memory address to physical addresses. Hitting on the VM doesn't come cheap!
Perl is environmentally friendly - it saves trees
|Replies are listed 'Best First'.|
Re^4: Reading huge file content
by BrowserUk (Patriarch) on Dec 07, 2007 at 05:00 UTC