---
name: "lbMalloc"
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/lbMalloc"
---

# lbMalloc(3)

Allocates memory.

## NAME

lbMalloc - Allocates memory.

## SYNOPSIS

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

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

## PARAMETERS

- **size**

  The size of the memory to allocate.

- **filename**

  The calling filename.

- **line**

  The calling line number.

- **debug\_level**

  The debug level.

## DESCRIPTION

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

## RETURNS

A pointer to the new chunk of memory.

## SEE ALSO

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