Hi!
I use the extended passthru driver with one timer and two queues: one
for sending and one for receiving particular packets. When I send a
packet from the sending queue, I call NdisMSendComplete and then in
PtSendComplete I can free resources I allocated in MPSendPackets (where
I mark these packets in MiniportReservedEx). But where shall I free the
resources (which I allocated in PtReceivePacket) when I pass up a packet
from the receive queue? Could this be a memory leak if I don’t free the
resources? Or I shouldn’t care about this?
Thanks for the help.
Best regards,
Baki
Baki,
I am not particularly familiar with the “extended PASSTHRU” sample but I can
tell you this: Packets that are indicated ‘up’ from PASSHTRU are either
completed immediately by upper bound protocols (for instance, when the
packet status is set to NDIS_STATUS_RESOURCES) or will be returned via
MiniportReturnPacket() when upper bound protocols are finished with the
packet. Any resources allocated can be released when
MiniportReturnPacket() is called. Most of the time that will include
returning the original packet to NDIS as well.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bakonyi Gabor
Sent: Thursday, February 09, 2006 1:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Free memory in IM driver
Hi!
I use the extended passthru driver with one timer and two queues: one for
sending and one for receiving particular packets. When I send a packet from
the sending queue, I call NdisMSendComplete and then in PtSendComplete I can
free resources I allocated in MPSendPackets (where I mark these packets in
MiniportReservedEx). But where shall I free the resources (which I allocated
in PtReceivePacket) when I pass up a packet from the receive queue? Could
this be a memory leak if I don’t free the resources? Or I shouldn’t care
about this?
Thanks for the help.
Best regards,
Baki
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@msn.com To unsubscribe
send a blank email to xxxxx@lists.osr.com