lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Aug 2016 12:45:18 -0600
From:	David Ahern <dsahern@...il.com>
To:	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 1/7] tools lib: Add bitmap_alloc function

On 8/1/16 12:02 PM, Jiri Olsa wrote:
> @@ -65,4 +66,13 @@ static inline int test_and_set_bit(int nr, unsigned long *addr)
>  	return (old & mask) != 0;
>  }
>
> +/**
> + * bitmap_alloc - Allocate bitmap
> + * @nr: Bit to set
> + */
> +static inline unsigned long *bitmap_alloc(int nbits)
> +{
> +	return malloc(BITS_TO_LONGS(nbits) * sizeof(unsigned long));
> +}
> +
>  #endif /* _PERF_BITOPS_H */

calloc? Can't imagine any user wanting an uninitialized bitmap.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ