
25 Aug
2005
25 Aug
'05
5:33 a.m.
Dylan Trotter wrote:
Hi,
I just wanted to point out a fairly major flaw with the Windows implementation of memory mapped files. In memory_mapped.cpp on line 205-207 a file mapping is created as follows:
::CreateFileMappingA( pimpl_->handle_, NULL, readonly ? PAGE_READONLY : PAGE_READWRITE, 0, 0, p.path.c_str() );
The problem with this is that if p.path.c_str() has any backslashes in it (very likely given that it's Windows), the call fails. From the MS documentation:
Thanks. I thought I eliminated the name a long time ago; I'll fix it in the patch I'm preparing right now (and add you to the acknowledgments).
Thanks,
Dylan Trotter
Jonathan