lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] RE: [lwip] free-ing of pbufs in netif->output function: wh


From: Lieverse, Paul
Subject: [lwip-users] RE: [lwip] free-ing of pbufs in netif->output function: who's res ponsible?
Date: Thu, 09 Jan 2003 00:15:16 -0000

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C1C12B.209DC6D0"

------_=_NextPart_001_01C1C12B.209DC6D0
Content-Type: text/plain

* Mumtaz Ahmad wrote: 
> I think pbufs are always deallocated after calling   
> low_level_output(ethernetif, q); in ethernetif.c

True, but that's only the q allocated for the ARP request. (lines 237 -
240).

However, in line 258 it says:
    return low_level_output(ethernetif, p);
So no pbuf_free() there.
Any pbuf that may have been allocated (line 190) and chained to p (lines
198 and 199) before is thus never deallocated.

The same holds for cs8900if.c, tapif.c, and tunif.c.

> please see the code again

I did, but I'm still left with the same questions I'm afraid :-(

Paul


------_=_NextPart_001_01C1C12B.209DC6D0
Content-Type: text/html;
        charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DISO-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [lwip] free-ing of pbufs in netif-&gt;output function: who's =
responsible?</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">* Mumtaz Ahmad =
wrote:</FONT><FONT FACE=3D"Arial">=A0</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">&gt; I</FONT> <FONT =
SIZE=3D2 FACE=3D"Arial">think pbufs are always deallocated after =
calling=A0=A0=A0</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">&gt; l</FONT><FONT =
SIZE=3D2 FACE=3D"Arial">ow_level_output(ethernetif, q); in =
ethernetif.c</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">True, but that's =
only the q allocated for the ARP request. (lines 237 -&nbsp; =
240).</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">However, in line 258 =
it says:</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
return low_level_output(ethernetif, p);</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">So no pbuf_free() =
there.</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">Any pbuf that may =
have been allocated (line 190) and chained to p (lines</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">198 and 199) before =
is thus never deallocated.</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">The same holds for =
cs8900if.c, tapif.c, and tunif.c.</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">&gt;</FONT> <FONT =
SIZE=3D2 FACE=3D"Arial">please see the code again</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">I did, but I'm still =
left with the same questions I'm afraid :-(</FONT>
</P>

<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">Paul</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C1C12B.209DC6D0--

--------------InterScan_NT_MIME_Boundary--

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]