Re: [lwip-users] How to release all memory to track leaks

2021-06-09 Thread Erik Ekman
The lwIP unit tests use this code to verify that all memory has been returned: https://git.savannah.nongnu.org/cgit/lwip.git/tree/test/unit/lwip_unittests.c#n48 On Fri, 4 Jun 2021 at 14:30, Dave Nadler wrote: > > R. Diez - While you are doing bare metal, you can find more info about newlib > mem

Re: [lwip-users] How to release all memory to track leaks

2021-06-04 Thread Dave Nadler
R. Diez - While you are doing bare metal, you can find more info about newlib memory use here: https://nadler.com/embedded/NXP_newlibAndFreeRTOS.html Hope that helps, Best Regards, Dave On 6/4/2021 7:43 AM, Trampas Stern wrote: In C there

Re: [lwip-users] How to release all memory to track leaks

2021-06-04 Thread Trampas Stern
In C there is a _sbrk(int incr) function. This function is called when memory allocation or deallocation happens. The newlib has their own version of this function, however via linker with the --specs=nosys.spec you can disable the default version and add your own. You can google sbrk for more in

Re: [lwip-users] How to release all memory to track leaks

2021-06-04 Thread Tomasz W
Hi Lok for this https://lists.nongnu.org/archive/html/lwip-devel/2020-12/msg00014.html In my case it solved the problem of the web server dying after a few days. pt., 4 cze 2021 o 12:14 R. Diez via lwip-users napisaƂ(a): > > Hi all: > > I have a bare-metal (Newlib, no threads) firmware that uses

[lwip-users] How to release all memory to track leaks

2021-06-04 Thread R. Diez via lwip-users
Hi all: I have a bare-metal (Newlib, no threads) firmware that uses lwIP and its httpd server to provide a simple web interface. The firmware is actually quite complex in other areas. I am trying to identify and track down memory leaks, so I implemented a "shutdown" command in the debug consol