[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] LwIP 1.3.2 -> 1.4.0: Huge RAM increase for PPP use
From: |
address@hidden |
Subject: |
Re: [lwip-users] LwIP 1.3.2 -> 1.4.0: Huge RAM increase for PPP use |
Date: |
Wed, 02 May 2012 23:20:07 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
Marco Jakobs wrote:
Hi Simon,
i'm using Rowley CrossStudio for ARM,
OK, I don't have a MAP parser for that, anyway...
but i've found a new buffer which
consumes most of the increased memory:
/** RX buffer size: this may be configured smaller! */
#ifndef PPPOS_RX_BUFSIZE
#define PPPOS_RX_BUFSIZE (PPP_MRU + PPP_HDRLEN)
#endif
This is around 1.5k and was not there in 1.3.2 ... however, there is no
advice in the code how "small" it can be defined to be still useful (and
what this buffer does).
I thought of something in that direction... In 1.3.2, this buffer has
been allocated from a PBUF_RAM pbuf. This was kind of broken from the
design point: PBUF_RAM is mostly used for TX while PPP used it for RX -
this could mean that allocating too much TX buffers could block RX.
Anyhow, the total amount of memory used by lwIP hasn't been changed by
this: the only change is that now, the memory is allocated statically,
while before that allocation was hidden inside 'ram_heap' (defined in
mem.c).
I'm still open for a good proposal for a change, if you have one...
Simon