lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] FreeRTOS/lwIP Win32 simulator project now hosted


From: Paul Archer
Subject: Re: [lwip-users] FreeRTOS/lwIP Win32 simulator project now hosted
Date: Mon, 25 Jul 2011 16:38:43 +1000

A bug that I have spotted with the stats tracking in sys_arch.c

When stats for 'used' counter is tracked, the macro
SYS_STATS_INC_USED(x) should be used.

So for example in
err_t sys_mbox_new(sys_mbox_t *mbox, int size)

#if SYS_STATS

                SYS_STATS_INC(mbox.used);

#endif /* SYS_STATS */

Should be replaced with
SYS_STATS_INC_USED(mbox.used);

There is no need for the #if SYS_STATS as the macro takes care of that for you.

When using a SYS_STATS_INC_USED macro, it also keeps track of the
maximum allocated at one time.

-- 
----
Regards
Paul Archer
address@hidden



reply via email to

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