I’m working in Windows 2000 and I want to allocate a collection of
pages into a contiguous region in the user mode of a given process.
The PCI device is capable of scatter-gather access to pages. What I
would like to do is allocate (with AllocateCommonBuffer) pages that
I can map into a contiguous region in the application memory. This
memory, shared with the device and the application, then acts similar
to a frame buffer.
I know about the ZwMapViewOfSection to map a contiguous region of
physical memory. This is the technique I use under NT. However, I
want to be a little easier on the O/S and dynamically allocate the
buffer in page size chunks. Problem is, I can’t find a way to map
page sized chunks into the process address space.
This is trivially easy under Linux: the mmap system call creates
a vma, that my driver can attach a nopage function to. Then I hand
the pages to the process as it touches them.
Is there *any* way under Windows 2000 to map a scattered collection
of pages into a contiguous region in a given process? If not, I’ll
just go back to using ZwMapViewOfSection and preallocating a big,
physically continuous buffer that can be mapped. That’s painful,
though.
Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com