RE: How to map the a block of kernel mem to 2 application s

Two options:

  1. Have both application access memory via IOCTLs,which is safe and solves
    synchronization problems(If in multiprocessor env use spinlock).Simply
    allocate memory inside your driver and create IOCTLs to move memory to and
    from the memory in the driver(actually this is I prefer to do it).

  2. Map physical memory allocated in the kernel to both. Quite cumbersome and
    somewhat tricky. You can find how in:
    Developing Windows NT Device Drivers by Dekker and Newcomer chapter 19

Arik

-----Original Message-----
From: yuanjun [mailto:xxxxx@21cn.com]
Sent: Tuesday, April 23, 2002 5:33 AM
To: NT Developers Interest List
Subject: [ntdev] How to map the a block of kernel mem to 2 applications

Hi, all

I’d to access a block of kernel mem this way:
Because I should write my program in a well-structured way, I’d to access a
block of kernel mem this way:
1, The kernel-mode module (or ,just call it a driver) allocates a block of
mem in kernel-space;
2, The Application1 map the kernel mem block into its own user-space;
3, The Application1 must try to let the Application2 can access this mem
block;
4, Because I should wrtie the programs in a well-structured way, I to have
let the Application1 pass something like pointer to Application2 instead of
letting the Application2 mapping the kernel-space mem into its own
user-space.

The question is : how can I do it?

thanks in advance.

yuanjun
b~{#?-g~}.~{.7’6~}~{,9#?#?#?#?5W#?F+#?~}^~{#?#?#?~}N~{#?2f#?#?~}z~{G’~}u~{&e~}jy~{#?%6#?~}j~{w’5W/o#?~}X~{,6#?~}
~{-J~}&