---
name: "bitmap_to_u32array"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/bitmap_to_u32array"
---

# bitmap\_to\_u32array(9)

copy the contents of bitmap to a u32 array of bits

## NAME

bitmap\_to\_u32array - copy the contents of bitmap to a u32 array of bits

## SYNOPSIS

**unsigned int bitmap\_to\_u32array(u32 \*** *buf***, unsigned int** *nwords***, const unsigned long \*** *bitmap***, unsigned int** *nbits***);**

## ARGUMENTS

*buf*

array of u32 (in host byte order), the dest bitmap, non NULL

*nwords*

number of u32 words in *buf*

*bitmap*

array of unsigned longs, the source bitmap, non NULL

*nbits*

number of bits in *bitmap*

## DESCRIPTION

copy min(nbits, 32\*nwords) bits from *bitmap* to *buf*. Remaining bits after nbits in *buf* (if any) are cleared.

Return the number of bits effectively copied.

## COPYRIGHT
