lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Memory Limitation of lwIP?


From: address@hidden
Subject: Re: [lwip-users] Memory Limitation of lwIP?
Date: Thu, 3 Aug 2017 21:09:48 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

nrichard wrote:
I have been able to get these all running
at the same time using the HEAP? method by setting both MEM_LIBC_MALLOC and
MEMP_MEM_MALLOC to 1.  However it is not consistent.  Sometimes the system
tells me "memp_malloc: out of memory in pool PBUF_POOL" even though I'm
using the HEAP method (I thought).

This is expected. Although using the heap instead of multiple pools, statistics and error messages are still kept per pool, as this makes it easier to start with heap and use the statistics to size
the pools later.

No problem so far except that your heap gets empty. Check your heap size. If that doesn't help,
set a breakpoint at that message and check your C library's heap state.

Also, when I try to add other system functions to my project, lwIP crashes.
I know 100% that it's lwIP crashing and I've come to the conclusion that
it's either a memory issue or a timing error

So you know 100% that it's lwIP crashing but you don't know what, how or why? To me that
sounds more like way below 100%...

Seriously, check how it crashes and set a breakpoint at the error/hardfault handler to debug
what's going on.
The list goes on... What I want to know is, are there any memory limitations
for lwIP?

No, you can give lwIP as much memory as you have :-)

Is it bad to have all these applications running off of the HEAP method?

You should be aware of the possibility of heap fragmentation and the fact that memory allocation can at some point get really slow depending on the free block count and sizes on your heap.

Other than that, it should work. For the reasons above, pools are preferred though.


Simon



reply via email to

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