lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [lwip] Possible memory leak (at least in my system)


From: David Haas
Subject: [lwip-users] [lwip] Possible memory leak (at least in my system)
Date: Thu, 09 Jan 2003 00:08:28 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_01D3_01C29A24.E9DD74A0
Content-Type: text/plain;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

I am having a problem with the way sys_mbox_post() is designed. It does =
not return an error code, but in my system I cannot guarantee that the =
post will always be successful. In fact if frames come in faster than =
the tcpip thread can process them, then the mbox is bound to be full. I =
am calling tcpip_input from an ISR, so I cannot suspend. I must drop the =
frame if the mbox is full. So I need an error return from =
sys_mbox_post() and tcpip_input() must free the pbuf if it gets this =
error. As it is now, when the mbox post fails, that pbuf chain is lost.

I will make this change in my code, but I request that you do so =
everywhere. Should I submit a patch? It will be quite a few files.

David Haas
NBS Card Technology
70 Eisenhower Drive,
Paramus, NJ 07652
Voice: 201-845-7373 x183
Fax: 201-845-3337
email: address@hidden

------=_NextPart_000_01D3_01C29A24.E9DD74A0
Content-Type: text/html;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>I am having a problem with the way sys_mbox_post() =
is=20
designed. It does not return an error code, but in my system I cannot =
guarantee=20
that the post will always be successful. In fact if frames come in =
faster than=20
the tcpip thread can process them, then the mbox is bound to be full. I =
am=20
calling tcpip_input from an ISR, so I cannot suspend. I must drop the =
frame if=20
the mbox is full. So I need an error return from sys_mbox_post() and=20
tcpip_input() must free the pbuf if it gets this error. As it is now, =
when the=20
mbox post fails, that pbuf chain is lost.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I will make this change in my code, but I request =
that you do=20
so everywhere. Should I submit a patch? It will be quite a few=20
files.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>David Haas<BR>NBS Card Technology<BR>70 Eisenhower=20
Drive,<BR>Paramus, NJ 07652<BR>Voice: 201-845-7373 x183<BR>Fax:=20
201-845-3337<BR>email: <A=20
href=3D"mailto:address@hidden";>address@hidden</A><BR></FONT></DIV><=
/BODY></HTML>

------=_NextPart_000_01D3_01C29A24.E9DD74A0--

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




reply via email to

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