Phobos addition formal review: std.experimental.allocator
Dmitry Olshansky via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 26 07:56:16 PDT 2015
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
More information about the Digitalmars-d
mailing list