REference Counting MDL.

Hi There,
I have some questions ObReferenceObject. Can I increase the reference count on MDL using ObReferenceObject so that the MDL is not freed when the Irp is completed. I know the critiques will kick in immediately but before thrashing the thread please assume that there is a understanding between the application and the driver that the same buffer will be sent again and again to the driver and I do not want to end up creating scatter-gather list again.

Is this possible?

Any pointers (and thrashings with interesting reasoning) are really appreciated.

  • Aj

>I have some questions ObReferenceObject. Can I increase the reference count

on MDL using ObReferenceObject so that the MDL is not >freed when the Irp
is completed.

No, MDLs are not object manager objects so they don’t have reference counts.

-scott


Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com

> I have some questions ObReferenceObject. Can I increase the reference count on MDL using

ObReferenceObject so that the MDL is not freed when the Irp is completed.

No, MDL is not Ob’s object.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> please assume that there is a understanding between the application and the driver that the same buffer

will be sent again and again to the driver and I do not want to end up creating scatter-gather list again.

Well, the most obvious solution in such situation is shared buffer, don’t you think…

Anton Bassov