Jump to content
  • Advertisement
Sign in to follow this  
Decrius

Loading files in memory format

This topic is 3814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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"

Share this post


Link to post
Share on other sites
Quote:
Original post by Basiror
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"


Thanks, just had the wrong terminology :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!