lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Get overall memory usage of LWIP


From: address@hidden
Subject: Re: [lwip-users] Get overall memory usage of LWIP
Date: Tue, 17 Jan 2023 20:51:04 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

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.moroz@gmail.com
<mailto:artem.moroz@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]