Hi All -
For IRP_MN_QUERY_DEVICE_RELATIONS busrelation irp, I had allocated paged
pool memory for device relation structure and set the device count to
zero, incase of no child device present on the bus.But driver verifier
was complaining ( bug check - 0x C4 , some un freed memory bytes in
paged pool ) about this un freed memory when my driver image was
unloaded from the system.
As per DDK documentation PnP should free up the memory that my driver
allocates for RP_MN_QUERY_DEVICE_RELATIONS.But it looks like it is not
doing so,this is really surprising me since the Windows .NET RC2 DDK
says the following in the IRP_MN_QUERY_DEVICE_RELATIONS section:
"If there is no child device present on the bus, the driver sets the
count to zero in the DEVICE_RELATIONS structure
and returns success. "
“If a driver returns relations in response to this IRP, it allocates a
DEVICE_RELATIONS structure from paged memory
containing a count and the appropriate number of device object
pointers. The PnP Manager frees the structure when
it is no longer needed.”
This seems to be an inconsistency between the DDK documentation and the
actual behaviour.Can any one advise me regarding this inconsistency of
behavior?
( Will PnP Manager frees the allocated memory for the device
relation structure when there is no device in the system during driver
unload? )
TIA,
Subbu