[PATCH v2] top: fix and merge code to parse /proc/meminfo

Ralf Friedl Ralf.Friedl at online.de
Mon Jul 28 14:27:37 UTC 2014


Timo Teras wrote:
> On Sun, 27 Jul 2014 21:50:28 +0200
> Denys Vlasenko <vda.linux at googlemail.com> wrote:
>> Applied, thanks!
> Thanks, though I noticed now a weirdness that did not happen before.
>
> +static void parse_meminfo(unsigned long meminfo[MI_MAX])
> +{
> ...
> +	memset(meminfo, 0, sizeof(meminfo));
>
> Seems to not work. The sizeof() return something small. Probably
> sizeof(unsigned long*).
>
> Is my compiler broken, or is the expected behaviour?
That is the expected behaviour. A parameter declaration of unsigned 
long[] is that same as unsigned long*.


More information about the busybox mailing list