lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Understanding memory configuration


From: address@hidden
Subject: Re: [lwip-users] Understanding memory configuration
Date: Mon, 17 Sep 2018 21:57:43 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 17.09.2018 18:10, Andy Pont wrote:
Hello,

I’m trying to figure out the memory settings being used by a project that I have inherited.  The lwipopts.h file contains:

#define MEM_USE_POOLS 1
#define MEMP_USE_CUSTOM_POOLS 1
#define MEM_USE_POOLS_TRY_BIGGER_POOL 1

I think this means that it allocates the memory that is defined in lwippools.h which is:

Right.


LWIP_MALLOC_MEMPOOL(14, 75)
LWIP_MALLOC_MEMPOOL(6, 225)
LWIP_MALLOC_MEMPOOL(1, 525)
LWIP_MALLOC_MEMPOOL(3, 1540)

I’m not clear what the LWIP_MALLOC_MEMPOOL macro does and how much RAM lwIP is actually trying to allocate.

That macro allocates pools of X elements with Y bytes each.
It allocates (14 * 75) + (6 * 225) + (1 * 525) + (3 * 1540) bytes plus a little offset for administration, so roughly 7,5 kB.


Simon

reply via email to

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