Il 27/02/2018 13:08, Giuseppe Modugno ha scritto:
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);
In my case, MEMP_MEM_MALLOC=0 needs 31000 bytes in RAM, while
MEMP_MEM_MALLOC=1 needs only 13172 bytes.
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users