Map to user space

I have a kernel mode driver (actually a graphics miniport driver) that allocates a buffer by calling ExAllocatePool(PagedPoolCacheAligned,NumberOfBytes).
Is there a way to make this buffer available for an application?
moczarAsked:
Who is Participating?
 
jkrCommented:
>>How can I create named memory object in the driver

I wouldn't create an object of >50MB in the driver, but rather have the application supply that. But, the API used for that are 'ZwCreateSection()'. The speed however might not be as fast, since the memory may be swapped out.
0
 
jkrCommented:
Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;191840 ("How To Share Memory Between User Mode and Kernel Mode")
0
 
moczarAuthor Commented:
jkr, thank you for the link!

How can I create named memory object in the driver (similar call to CreateFileMapping)?
Can I use the mapped view of this section as fast as the buffer allocated by ExAllocatePool?
(Note: the size of the buffer in question can be >50Mb. I read somewhere that using file mapping object for large buffers may degrade the system performance.)

Instead of file mapping can I use ExAllocatePool, MmProbeAndLockPages, MmMapLockedPages, etc. If such a sequence can work, what steps would it consist of exactly (I haven't used these memory management functions before)?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.