---
name: "lbCalloc"
section: "3"
platform: "linux"
package: "libleakbug-dev"
version: "0.1.5+debian-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/lbCalloc"
---

# lbCalloc(3)

Allocates and clears an array.

## NAME

lbCalloc - Allocates and clears an array.

## SYNOPSIS

**#include \<leakbug.h\>**

**void \*lbCalloc(size\_t nmemb, size\_t size, const char \*filename, int line, int debug\_level);**

## PARAMETERS

- **nmemb**

  The number of elements to allocate.

- **size**

  The size of each element.

- **filename**

  The calling filename.

- **line**

  The calling line number.

- **debug\_level**

  The debug level.

## DESCRIPTION

Allocates and clears an array. This wraps calloc(), and a new calloc() macro is created to wrap this. When using leakbug, you shouldn't call this directly.  Instead, use calloc() as usual.

## RETURNS

A pointer to the first element in the new chunk of memory.

## SEE ALSO

[calloc(3)](/calloc/3.md)
