lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Memory Limitation of lwIP?


From: nrichard
Subject: [lwip-users] Memory Limitation of lwIP?
Date: Wed, 2 Aug 2017 13:58:18 -0700 (MST)

I know there are a few threads out there about lwIP's memory, but I'm still
having a hard time understanding what specifically a user needs in order for
lwIP to work properly.  I have lwIP running with these 4 applications.

     -SNMP
     -HTTP web server, with about 10 web pages (a 332 KB fsdata.c), SSI's,
CGI's
     -Telnet Server
     -FTP Server

SNMP and HTTP are the big ones.  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).

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 (adding debug prints makes the
project function correctly).

When I print stats, I can see under MEM HEAP that is uses around max:35000
(I feel like I've seen it higher).  I would assume this is 35kB of memory
used.  I have a total of 128kB of memory, so this is okay.  My other system
functions don't take more than 30kB themselves, so at most I would think my
system uses 65kB (~50% total) at the moment.

The list goes on... What I want to know is, are there any memory limitations
for lwIP?  Is it bad to have all these applications running off of the HEAP
method?  Adding more system functions causes lwIP to crash unless I have
debug prints turned on.

A good question to ask, could someone share an example lwipopts.h / opt.h
file with memory settings that work for them?  I'm having a hard time
understanding how much memory I need for lwIP and all my applications for
it, as well as whether or not I should be using the HEAP method or the POOL
method.



--
View this message in context: 
http://lwip.100.n7.nabble.com/Memory-Limitation-of-lwIP-tp30350.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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