Variable sized classes and memory mapped files
|September 8, 2014||Posted by forumadmin under TechQns||
Is there an accepted way to store variable sized classes in memory mapped files, or is this always considered bad practice? Essentially I want to store a collection of image patterns files that are third party classes in MMF. Once they are loaded, they are read only. They are guaranteed to be less than a given size, so I was planning on allocating blocks and having a fixed starting position for each block.
It seems MMF really is designed around using fixed-size data blocks (especially structures) or streams (such as binaryreader/writer). I’m assuming I’ll need to use some streaming approach. Any recommendations for getting the least performance hit when streaming lots 20MB files?
|Asked By – VoteCoffee||Read Answers|