LWIP Memory options question I have been using LWIP on a Stellaris CPU with TI's code Composer Studio and have had it working for some time but I have some questions about tuning it for RAM usage. I have plenty of code space but limited RAM (96K RAM) total. The application is using LWIP only for three TCP/IP sockets so no UDP etc. The messages are all 256 bytes in both direction but one socket does send about 10k bytes of data at about 10 times a second. For LWIP, I am currently using memory defined only by MEM_SIZE, so MEM_LIBC_MALLOC, MEM_USE_POOLS and MEMP_USE_CUSTOM_POOLS all are zero. My MEM_SIZE is defined as (15 * 1024).
I have read the wiki, opt.h file, lwipopts.h and searched through this forum but I still have a few things that are not clear to me I wanted to see if I could get some help understanding this. 1) Would there be benefit in my app of using MEM_LIBC_MALLOC? I don't use malloc or free in my application anywhere and I am not concerned with code space. Would there be any RAM savings if I were to turn MEM_LIBC_MALLOC on? I have seen comments about the risk of fragmentation if using MEM_LIBC_MALLOC so I don't know if it's with the risk to use MEM_LIBC_MALLOC. Could someone explain the risk of fragmentation? 2) If I did decide to use MEM_LIBC_MALLOC, how much RAM would I need to tell the compiler to reserve from the heap for lwip? Based on what I am using now, would I need to tell the compiler to allow about what I have defined for (MEM_SIZE) now 15K in my case? Is there a picture anywhere that shows a "memory map" of how the memory LWIP uses is broken down into pbufs, pools etc? Thanks, DB _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
