Re: Replacing LWIP
Posted: Fri Apr 12, 2019 2:56 am
BTW I now have an additional 11 Kb of free ram, which I, for a part, assigned to LWIP, and now it runs rock solid again.
So if one would want to, one could indeed run LWIP completely in static memory, without the need of pvPortMalloc and friends, making runtime more deterministic.
IMHO malloc etc. only make sense on a multitasking system with a MMU, where memory can be allocated but not assigned when it's not used. Otherwise you'll have the situation where there is plenty of memory each time you look and still at some points you mysteriously run out of memory because all consumers are active at the same time. Using static allocation, you'll always know what's the max memory use, no suprises there.
So if one would want to, one could indeed run LWIP completely in static memory, without the need of pvPortMalloc and friends, making runtime more deterministic.
IMHO malloc etc. only make sense on a multitasking system with a MMU, where memory can be allocated but not assigned when it's not used. Otherwise you'll have the situation where there is plenty of memory each time you look and still at some points you mysteriously run out of memory because all consumers are active at the same time. Using static allocation, you'll always know what's the max memory use, no suprises there.