www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1810] New: MmFile anonymous mapping does not work under win32

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: default_357-line 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


-- 
Jan 30 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1810





------- Comment #1 from default_357-line yahoo.de  2008-01-31 20:00 -------
Created an attachment (id=224)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=224&action=view)
Add code to handle the filename=null case


-- 
Jan 31 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1810





------- Comment #2 from default_357-line yahoo.de  2008-02-05 20:06 -------
Created an attachment (id=225)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=225&action=view)
Added code to handle a null hFile in the destructor


-- 
Feb 05 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1810


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla digitalmars.com  2008-03-07 00:27 -------
Fixed dmd 1.028 and 2.012


-- 
Mar 06 2008