lkml.org 
[lkml]   [2021]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 01/22] perf record: Introduce thread affinity and mmap masks
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

\
 
 \ /
  Last update: 2021-07-01 16:24    [W:0.078 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site