[ros-dev] Memory Manager problem

Ge van Geldorp gvg at reactos.com
Sun Sep 26 22:19:00 CEST 2004


Attached is a test program that demonstrates a problem with memory mapped
files. Basically, if you try to MapViewOfFile() a part of the file at
non-zero file offset, ReactOS will still map the beginning of the file.

I think I found the cause of this, the attached .diff fixes it. My fix
uncovered another (small) problem, ViewOffset is relative to the start of
the segment, not the start of the section. So instead of passing
SectionSegments[i].VirtualAddress we need to pass 0.

I'd appreciate it if someone who actually understands the Mm stuff can take
a look at this.

Gé van Geldorp.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mappedfile.zip
Type: application/x-zip-compressed
Size: 1116 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-dev/attachments/20040926/38c54e08/mappedfile.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: section.diff
Type: application/octet-stream
Size: 1490 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-dev/attachments/20040926/38c54e08/section.obj


More information about the Ros-dev mailing list