Solved

Map to user space

Posted on 2004-10-26
216 Views
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?
0
Question by:moczar
    3 Comments
     
    LVL 86

    Expert Comment

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

    Author Comment

    by:moczar
    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
     
    LVL 86

    Accepted Solution

    by:
    >>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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
    With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
    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…
    This video discusses moving either the default database or any database to a new volume.

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now