Tech Support > Microsoft Windows > Drivers > kernel allocated memory used by application
kernel allocated memory used by application
Posted by sulabh on August 19th, 2007


Hi all
how i can send the memory location which is allocated by driver. used
by the application.

can you tell me methods for this:
1. i want to allocates the memory in driver level.
2. application can use this memory location and fill the data and send
to driver.

how i can do this step:

regards
suli



Hi Maurice,
This is the same sai who reported sometime back delay caused by the
pending IOCTL.I am trying to allocate memory in the kernel and map
that to the user,to improve the latency caused by the pending IOCTL
and the routines to call if we allcote the buffer in the user
modeapp.
This is what i am trying to do;

proc:


1) Allocate the memory in the driver and send that to the user mode
application.
2) The user mode application access the pointer and writes some
entries of type ULONG.
3) Next The user mode application sends the IOCTL requestiing the
driver to read the contents from the shared buffer in the ISR.
4) In the ISR I read the contents from the shared kernel memory and
writes to the device register.
5) As the IOCTL request from the user is asynchronous i keep that IRP
pending.
6) There is a FIFO on the device that can take only 2048 entries.
7) when i send 2048 for the first time it works excellent.
8) when send few more entries like 5000 it crashes the system.
when i send 5000 entries what happens is the driver writes first 2048
entries when it is interrupted and waits for the device to generate
another interrupt to write remaining half.
9) when it writes the remaining half it crashes.when i debug it found
to be only when access the kernel shared memory during the second half
i see the crash.

Posted by kuasha on August 19th, 2007


http://support.microsoft.com/default.aspx/kb/191840

I think you should consider to change the design. Pending IOCTL should be
used. In Windows X64 it creates a great problem.

--
Sincerely,
Maruf Maniruzzaman,
Software Engineer,
KAZ Software Limited,
Dhaka, Bangladesh.
http://www.kaz.com.bd
http://www.kuashaonline.com



"sulabh" wrote:

Posted by kuasha on August 19th, 2007


If you try to improve performance by shared memory it may gone while make
them synchorised and secured. So, please be careful about the design.

--
Sincerely,
Maruf Maniruzzaman,
Software Engineer,
KAZ Software Limited,
Dhaka, Bangladesh.
http://www.kaz.com.bd
http://www.kuashaonline.com



"sulabh" wrote:

Posted by Maxim S. Shatskih on August 19th, 2007


Do this vice versa - allocate in the app and provide to the driver.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"sulabh" <sulibsp@gmail.com> wrote in message
news:1187503516.907498.137190@j4g2000prf.googlegro ups.com...


Similar Posts