Home > Web Site Updates > CMemMapFile v1.58

CMemMapFile v1.58

January 26, 2014

Just to let everyone know that v1.58 of CMemMapFile has been released. Updates for this version include:

  • Updated copyright details.
  • Updated the code to clean compile on VC 2013
  • Updated the code to clean compile using /analyze
  • Reverted the code changes which made the class completely thread-safe. The issue was that you ended up with a class which had two different synchronisation primitives running in parallel throughout the class codebase. This design pattern is always bad and in this case could lead to thread deadlock situations in some situations. Similar to the MFC thread synchronisation primitives design patterns, an instance of the CMemMapFile class should only be used from the one thread. If you want to use the same logical memory mapped file from multiple threads in your application, then create a second instance and simple call the MapFile, MapMemory or MapExistingMemory methods to get access to the mapping. See the "MoniterSM" worker thread in testmemmap.cpp in the sample app on how to do this correctly. Thanks to "jianhongsong" for reporting this issue.
Advertisements
Categories: Web Site Updates
%d bloggers like this: