[Issue 1810] New: MmFile anonymous mapping does not work under win32

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 30 11:50:08 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1810

           Summary: MmFile anonymous mapping does not work under win32
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: default_357-line at yahoo.de


Sample code:

import std.mmfile, std.stdio;

void main() {
  auto test = new MmFile(null, MmFile.Mode.ReadWriteNew, 1024*1024, null);
  writefln("Done");
}

The problem:
"Error: : The system cannot find the path specified."

It looks like the MmFile code tries to open the null as a file and fails;
however, the spec says that null as a filename creates an anonymous mapping.

Reference: http://digitalmars.com/d/1.0/phobos/std_mmfile.html

Since my StackThreads implementation relies on memory-mapped files for stack
memory, this completely breaks my code under win32. A solution would be greatly
appreciated.

 --downs


-- 



More information about the Digitalmars-d-bugs mailing list