Am 17.01.2023 um 19:41 schrieb Artem Moroz:
My lwipopts.h file attached

On Tue, Jan 17, 2023 at 8:40 PM Artem Moroz <artem.mo...@gmail.com
<mailto:artem.mo...@gmail.com>> wrote:

    Hi everybody!

    I have some issues with memory management on my device. I want to
    know which parts of LWIP allocate how many bytes. I am using
    standard C memory allocation functions: malloc, free.

With LWIP_STATS enabled, you can always break in your debugger and check
the 'lwip_stats' variable. Under 'mem' and 'memp' you'll see the heap
usage and pool usage. Heap usage is not tracked per allocation source
(so no way to see which part allocates how many bytes), but the memp
part holds allocation counts, which you can multiply by the object size
to get an allocation size sum. This should even work with
MEMP_MEM_MALLOC enabled (like you have).

Regards,
Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to