[Top][All Lists]

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

[lwip-devel] [bug #60758] Provide a way to release all memory

From: R. Diez
Subject: [lwip-devel] [bug #60758] Provide a way to release all memory
Date: Thu, 10 Jun 2021 04:22:52 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Follow-up Comment #2, bug #60758 (project lwip):

> No, callign al timeout handlers will definitively not be enough.

Could you elaborate more?

I do not know much about lwIP's internals, so I can only describe the naive
train of thought: if I remove all network interfaces and make everything
time-out (perhaps by artificially moving the current time far into the
future), wouldn't all connections and PCBs (listening or not) be automatically
destroyed? What resources would remain then?

That information will probably be useful not just for future implementers: if
I know what to expect, I could code an exception, so that those memory blocks
are skipped from the final memory leak report.

> As long as you don't know exactly how this one
> would be easier as bug #55598 (clean shutdown)

I cannot know that 'exactly', because I am not familiar lwIP's internals.

The "clean shutdown" bug talks about being able to restart. Normally, that is
harder to achieve than providing a termination routine.

Such a routine could just release all malloc() memory and not bother to reset
everything for an eventual restart. The documentation could state that lwIP is
afterwards not stable, so that calling any other lwIP function is likely to

But if you know better, you can close this bug yourself.

There is one more aspect: one could implement clean termination and restart,
and still not release all memory. For example, the restarted lwIP could re-use
some old memory pools that are still hanging around.

> It would be better off in the "tasks" section.

I do not know what "tasks" section you are talking about, but yes, I gather
that you could move it there and close this feature request as "moved to the
tasks section".


Reply to this item at:


  Message sent via Savannah

reply via email to

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