Loading files in memory format
Hey,
I heard about this technique that you could have a file which is already in the memory format, so it's loaded much faster into memory then normal files. However, there doesn't seem to be much resources about this, so I was wondering: how can I save a file in memory format? And, what is different when it's in memory format (as in, what's in the file different...it's bigger I guess...).
Is there any library or function in C (or C++) to save and load such a file?
Thanks :)
Decrius
[Edited by - Decrius on July 6, 2008 3:51:53 AM]
fread and fwrite
Make sure you have some plan in place to do pointer fixup. Also make sure that you preserve data alignments after reading when you use any SSE in your code.
Make sure you have some plan in place to do pointer fixup. Also make sure that you preserve data alignments after reading when you use any SSE in your code.
I guess he is talking about memory-mapping, you can use memory mapping in order to load a huge file right into memory without having to parse and copy it.
just google "memory mapping"
just google "memory mapping"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement