Sharing memory between app & driver

Hello All,
I have allocated a buffer in my kernel mode driver using
MmAllocateContiguousMemory() function in my DriverEntry routine since i want
a large physically contiguous buffer more than the PAGE_SIZE(4096 bytes) ie
1MB size.Can i access this buffer in the application.I want to fill the data
from the application into this buffer.
Any suggestion which can get me started on this would be greatly
appreciated.
Thanking all in advance.
With Regards,
Sachin Anvekar.

Build a MDL on it and then call MmMapLockedPages(…UserMode…)

----- Original Message -----
From: “Sachin”
To: “NT Developers Interest List”
Sent: Saturday, October 19, 2002 3:29 PM
Subject: [ntdev] Sharing memory between app & driver

> Hello All,
> I have allocated a buffer in my kernel mode driver using
> MmAllocateContiguousMemory() function in my DriverEntry routine
since i want
> a large physically contiguous buffer more than the PAGE_SIZE(4096
bytes) ie
> 1MB size.Can i access this buffer in the application.I want to fill
the data
> from the application into this buffer.
> Any suggestion which can get me started on this would be greatly
> appreciated.
> Thanking all in advance.
> With Regards,
> Sachin Anvekar.
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

if you are trying to share memory between your app and your hardware you
should be allocating memory using the DMA API AllocateCommonBuffer()
rather than MmAllocateContiguousMemory. The latter makes no effort to
ensure that the memory is accessible by your device on the given
platform.

if you aren’t sharing the memory with your device, why are you bothering
with physically contiguous memory?

-p

-----Original Message-----
From: Sachin [mailto:xxxxx@tatainfotech.com]
Sent: Saturday, October 19, 2002 4:30 AM
To: NT Developers Interest List
Subject: [ntdev] Sharing memory between app & driver

Hello All,
I have allocated a buffer in my kernel mode driver using
MmAllocateContiguousMemory() function in my DriverEntry routine since i
want a large physically contiguous buffer more than the PAGE_SIZE(4096
bytes) ie 1MB size.Can i access this buffer in the application.I want to
fill the data from the application into this buffer. Any suggestion
which can get me started on this would be greatly appreciated. Thanking
all in advance. With Regards, Sachin Anvekar.


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%