Multiple device instances and its memory

I have a UMDF2 virtual serial driver and it create multiple instances of devices.

It is set to run each instance of device in separate Host process by using UmdfHostProcessSharing = ProcessSharingDisabled in INF.

I hope, as each instances are in different host processes, there will not have any memory sharing between the instances. What ever the Queues and data structures one device creates belongs to only that device. Please let me know your comments.

Sure, separate process per device means exactly that: no sharing of your device data.

In my mind, such a request is a sign of a poor design. You ought to be able to keep your queues and data structures separated on your own, using contexts. You have to go out of your way to get crosstalk between instances. Remember, kernel drivers have had multiple instances in a single address space since the very beginning.

1 Like

What Mr. Roberts said. There’s no sharing ordinarily in any case… except your Driver Context, if you have one.

I’m wondering if you might be misunderstanding a general WDF concept about what’s shared and what isn’t? Maybe??

Peter

1 Like

Thanks!, Driver is using Context to separate the data between the device instances. I was just double checking these with experts! Thanks!