[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c |
Date: |
Thu, 09 Jan 2003 00:01:47 -0000 |
Hi!
On Mon, 2002-11-11 at 16:51, address@hidden wrote:
> > > Another issue is the queueing of packets that
> > > are created by the user code with netbuf_ref().
> > > This creates a chained pbuf with at least one
> > > one element having the attribute PBUF_ROM.
> > > There's a pending danger that the data part
> > > of such a buffer gets overwritten by the
> > > application before the queued packet is sent.
> > > Should these be copied?
>
> > The application must only overwrite that area when it's
> > certain that it got sent.How it is to be notified I don't know.
> > But the point of PBUF_ROM is to tell the stack not to copy so
> > I think it shouldn't.
> >
> Very good mentioning this, as this is an outstanding issue not
> yet resolved.
Pbufs of type PBUF_ROM are never supposed to be overwritten by the
application (hence the name ROM = Read Only Memory). If there are
problems with netbuf_ref() and pbufs, it is better to change the netbuf_
API than the core code.
So: no copying of PBUF_ROM pbuf, since this should have been done by the
application (into a PBUF_RAM pbuf) if the application intended to
overwrite the data.
Cheers,
/adam
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Kieran Mansley, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Nicolas Moreau, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c,
Adam Dunkels <=
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09