[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Map to user space

Posted on 2004-10-26
Medium Priority
Last Modified: 2013-12-03
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?
Question by:moczar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 86

Expert Comment

ID: 12411156
Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;191840 ("How To Share Memory Between User Mode and Kernel Mode")

Author Comment

ID: 12419573
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)?
LVL 86

Accepted Solution

jkr earned 1000 total points
ID: 12424584
>>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.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question