[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] memory leak in udp
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] memory leak in udp |
Date: |
Thu, 09 Jan 2003 01:53:52 -0000 |
Hi David!
On Wednesday 30 January 2002 17.51, you wrote:
> I'm losing memory as I run packets through the UDP path. Should udp_init()
> register reclaim functions as tcp_init() does? What would that look like?
Since UDP does not buffer and queue packets in the way that TCP does, it has
no way of reclaiming buffer memory (with reclaim functions). (I.e., UDP does
not use any memory other than that used for PCBs.)
Are you using the raw API or the sequential API? If you are using the raw
API, the incoming pbufs must be deallocated with pbuf_free() when the
application is done with them, and the sequential API requires that
netbuf_delete() is called for incoming buffers. Perhaps that could be your
problem?
What type of memory are you losing (heap (mem), pool (memp) or buffers
(pbuf))?
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]