lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] memory pools question


From: jblackarty
Subject: [lwip-users] memory pools question
Date: Wed, 25 Jan 2012 11:01:56 +0700

I've completely broken my brain on memory mechanisms used in lwip.
It's totally unclear are mem and memp independent mechanisms, or mem
utilizes memp, or memp uses mem, or they are cross-references each
other ? Custom pools are part of pools (memp), or pools are part of
custom pools ?

There are complicated set of options:
MEM_LIBC_MALLOC,
MEMP_MEM_MALLOC,
MEM_USE_POOLS,
MEMP_USE_CUSTOM_POOLS,
MEMP_NUM_*,
MEM_SIZE,
PBUF_POOL_SIZE.
How they related to each other ?
For MEMP_MEM_MALLOC a comment says "Use mem_malloc/mem_free instead of
the lwip pool allocator.". But mem_malloc is part of pool mechanisms.
How it can be disabled ? Also "Especially useful with MEM_LIBC_MALLOC
..." confuses. Isn't libc allocator completely disables pool mechanism
? These options must exclude each other.
Is it possible disable allocating standard structs in pool at all ?
Does it makes sense configure MEMP_NUM_* options if MEM_LIBC_MALLOC
enabled ?
MEM_SIZE includes only pool of standart structures or also pbufs pool ?

Questions may be continued indefinitely. lwip source code doesn't
describe architecture because it's heavily stuffed with complex macro conditions
nested each in other. "Custom_memory_pools" article on wiki doesn't
help too because it doesn't describe whole memory mechanism completely.
I will appreciate if someone throw light upon this subject.





reply via email to

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