[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160428183604.GC3386@kernel.org>
Date: Thu, 28 Apr 2016 15:36:04 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Vaishali Thakkar <vaishali.thakkar@...cle.com>
Cc: peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tests: Do not use sizeof on pointer type
Em Thu, Apr 28, 2016 at 10:16:57PM +0530, Vaishali Thakkar escreveu:
> Using sizeof on a malloced pointer type will return the wordsize
> which can often cause one to allocate a buffer much smaller than
> it is needed. So, here do not use sizeof on pointer type.
>
> Note that this has no effect on runtime because 'dsos' is a
> pointer to a pointer.
>
> Problem found using Coccinelle.
Thanks, applied.
- Arnaldo
Powered by blists - more mailing lists