Re: [PATCH v8 01/22] perf record: Introduce thread affinity and mmap masks
From: Arnaldo Carvalho de Melo
Date: Thu Jul 01 2021 - 10:23:27 EST
Em Thu, Jul 01, 2021 at 04:05:09PM +0300, Bayduraev, Alexey V escreveu:
> Hi,
>
> On 30.06.2021 19:17, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jun 30, 2021 at 06:54:40PM +0300, Alexey Bayduraev escreveu:
> [SNIP]
> >> +static void record__mmap_cpu_mask_free(struct mmap_cpu_mask *mask)
> >> +{
> >> + bitmap_free(mask->bits);
> >> + mask->nbits = 0;
> >
> > Plese use NULL, as 'mask->nbits' is a pointer.
>
> In perf/util/mmap.h "nbits" is size_t:
>
> struct mmap_cpu_mask {
> unsigned long *bits;
> size_t nbits;
> };
My bad, I saw the pattern of:
*_free(mask->bits);
mask->bits = 0;
Nevermind :-)
- Arnaldo