I'm thinking if it's better to set MEMP_MEM_MALLOC or not in my
application. I'm working with MEMP_MEM_MALLOC=1 (I started from an
example) and it works. However I'm not sure it's the best choice for me.
So what are the arguments for and against MEMP_MEM_MALLOC?
This is what I have understood:
* lwip *always* uses pools for some dynamic data (for example UDP PCBs
and timeouts);
* pools have a *fixed* number for maximum allocated elements (for
example, MEMP_NUM_SYS_TIMEOUT for timeouts);
* (MEMP_MEM_MALLOC=0): all the elements of the pools are statically
allocated (so they're not in the heap);
* (MEMP_MEM_MALLOC=1): the elements of the pools aren't statically
allocated, but they're (de)allocated at run-time with malloc/free,
when needed;
* allocation of an element is much more fast if MEMP_MEM_MALLOC=0
(otherwise malloc/free are used);
* MEMP_MEM_MALLOC=0 is a good choice if available malloc/free are poor
(in my case, I'm using newlib on Cortex-M3... I don't really know if
it's a good implementation or not).
What are your suggestions?
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users