Is it possible to read data directly from a kernel buffer?

Hey guys, are there APIs or methods to acess directly data in kernel in Windows?

I am working with an ASIO system, and currently my software archtecture uses IOCTLs to read and write data to the kernel buffers to transport the audio. So I am talking about at least two memory copies, plus allocating mdls, getting adresses and all that.

Isnt there a way, like CoreAudio in Mac, which the data does not have to leave the kernel to be read in user mode?

xxxxx@hotmail.com wrote:

Hey guys, are there APIs or methods to acess directly data in kernel in Windows?

Yes, a kernel driver can map a kernel buffer into user memory, but in
general that is not recommended, because it represents a security
danger. Remember that any process can whack another processes memory
space at will.

I am working with an ASIO system, and currently my software archtecture uses IOCTLs to read and write data to the kernel buffers to transport the audio. So I am talking about at least two memory copies, plus allocating mdls, getting adresses and all that.

This is called “premature optimzation”. A modern architecture can copy
memory at better than 10 gigabytes per second. Even with a fancy audio
stream, those copies represent a trivial CPU demand. It’s not worth the
security exposure.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.