1810 – MmFile anonymous mapping does not work under win32

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1810 - MmFile anonymous mapping does not work under win32
Summary: MmFile anonymous mapping does not work under win32
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 All
: P3 major
Assignee: Walter Bright
URL:
Keywords: patch
Depends on:
Blocks:
Reported: 2008年01月30日 13:50 UTC by FeepingCreature
Modified: 2015年06月09日 01:31 UTC (History)
0 users

See Also:


Attachments
Add code to handle the filename=null case (1.45 KB, patch)
2008年01月31日 20:00 UTC, FeepingCreature
Details | Diff
Added code to handle a null hFile in the destructor (1.70 KB, patch)
2008年02月05日 20:06 UTC, FeepingCreature
Details | Diff
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description FeepingCreature 2008年01月30日 13:50:06 UTC
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
Comment 1 FeepingCreature 2008年01月31日 20:00:14 UTC
Created attachment 224 [details] 
Add code to handle the filename=null case
Comment 2 FeepingCreature 2008年02月05日 20:06:36 UTC
Created attachment 225 [details] 
Added code to handle a null hFile in the destructor
Comment 3 Walter Bright 2008年03月07日 00:27:15 UTC
Fixed dmd 1.028 and 2.012


AltStyle によって変換されたページ (->オリジナル) /