On 26-Jun-2015 17:51, Alex Parrill wrote:
The Windows MMap allocator only keeps one HANDLE around, and creates a new one on each `allocate`. Thus, `deallocate` closes the latest handle, regardless of what it was actually passed, so it leaks.
Actually I don't see why Windows couldnt' just use VirtualAlloc w/o messing with files.
If I'm reading the docs for `CreateFileMapping` right, you should be able to close the handle after calling `MapViewOfFile`; the internal data will persist until you unmap the memory region.
IIRC no you can't. I'd need to double check that though. -- Dmitry Olshansky