Most efficient way to load data from file to RAM?

What is the most efficient (fastest) way to load data from a file on HDD to RAM? (which would allow to only load a limited section of that file - eg. load only half of the file etc.)
What do you mean? All variables are stored in ram, so just allocate some memory and load binaries from hdd there
For windows. I mean in terms of what function to use. Are there more efficient ways to read? (especially if you'll be reading long sequences?)
It depends on what you want to do with it. If you want an unformatted read, take a look at memory mapped files.
Topic archived. No new replies allowed.