Re: Memory leak when receiving from NDISWAN
- From: "Stephan Wolf [MVP]" <stewo68@xxxxxxxxxxx>
- Date: 17 May 2005 02:53:18 -0700
Benoît Bousquet wrote:
> The issue I'm having is that, when receiving packets from NDISWAN,
NonPaged
> memory gets eaten, 4K at a time. I'll summarize what the code path
looks
> like:
In the code snippets you seem to always call NdisDprFreePacket() on the
just allocated packets.
You must not free such packets as long as they are in use by other
networking components. That is, when you pass a newly allocated packet
to either NdisMIndicateReceivePacket() or NdisSend(), you must wait
until that packet is returned to you via either MiniportReturnPacket()
or NdisMSendComplete(), respectively.
The only exceptions to this rule are:
1. ..if you set the packet's Status to NDIS_STATUS_RESOURCES before
indicating up the packet descriptor.
2. ..if NdisSend() returns anything else but NDIS_STATUS_PENDING.
Please see the DDK docs for details.
Stephan
.
- Follow-Ups:
- Re: Memory leak when receiving from NDISWAN
- From: Benoît Bousquet
- Re: Memory leak when receiving from NDISWAN
- References:
- Memory leak when receiving from NDISWAN
- From: Benoît Bousquet
- Memory leak when receiving from NDISWAN
- Prev by Date: Re: Printer Driver Question
- Next by Date: About IoGetDeviceObjectPointer and KB835732
- Previous by thread: Memory leak when receiving from NDISWAN
- Next by thread: Re: Memory leak when receiving from NDISWAN
- Index(es):
Relevant Pages
|