mmap can really help with this too. It won't stop you from being silly and using random memory access patterns, but it does abstract away the file access as a piece of address space. Short of running on a 32bit machine, this can help a lot. Even on a 32bit machine you can abstract it away with another later and window the access.