---
name: "bitmap_fold"
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_fold"
---

# bitmap\_fold(9)

fold larger bitmap into smaller, modulo specified size

## NAME

bitmap\_fold - fold larger bitmap into smaller, modulo specified size

## SYNOPSIS

**void bitmap\_fold(unsigned long \*** *dst***, const unsigned long \*** *orig***, unsigned int** *sz***, unsigned int** *nbits***);**

## ARGUMENTS

*dst*

resulting smaller bitmap

*orig*

original larger bitmap

*sz*

specified size

*nbits*

number of bits in each of these bitmaps

## DESCRIPTION

For each bit oldbit in *orig*, set bit oldbit mod *sz* in *dst*. Clear all other bits in *dst*. See further the comment and Example \[2\] for **bitmap\_onto** for why and how to use this.

## COPYRIGHT
