espressif / esp-lwip

Fork of lwIP (https://savannah.nongnu.org/projects/lwip/) with ESP-IDF specific patches
Other
79 stars 126 forks source link

Added MEMP_MEM_MALLOC_CHECK_MAX option #63

Open martinKupec opened 7 months ago

martinKupec commented 7 months ago

This option adds functionality to enforce max memory usage in the same way it is enforced by standard memory pool allocator.

Everything is #if guarded by MEMP_MEM_MALLOC_CHECK_MAX which is disabled by default.

During testing we have found some problem with LWIP_NUM_SYS_TIMEOUT_INTERNAL, as there are missing few chunks for timers. On the other hand, this makes options like CONFIG_LWIP_MAX_ACTIVE_TCP work. In general it puts to work all MEMPNUM* options which do nothing in current state.

Adding MEMP_MEM_MALLOC_CHECK_MAX to lwipopts.h file in IDF repository is needed to make this change effective. This can be done through config option.