how application use Driver allocated memory space.

S

sulabh

Hello all,

i allocate memory in driver and pass the base address of this memory
into the application.
how the application map this memory in user space.

regards
suli
 
D

Don Burn

This is an incredibly bad idea. First unless you are extremely careful you
can open a major security hole. Second, you are looking at a ton of code
to handle detection of application exit, or else you are looking at a major
memory leak.

Instead have the application allocate the memory and pass it in via an
IOCTL. Note even then if you are sharing the memory between the
application and the driver, unless you are really good you are likely to
have a bigger overhead to synchronize these accesses than if you just used
regular calls. I have seen the shared data used correctly but 90% of the
time I found that I improved performance and reliability by pulling out
stuff like this.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top