---
name: "firestring_malloc"
section: "3"
platform: "linux"
package: "libfirestring-dev"
version: "0.9.12-8"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/firestring_malloc"
---

# firestring\_malloc(3)

malloc(3) with internal result checking

## NAME

firestring\_malloc - [**malloc**(3)](/malloc/3.md) with internal result checking

## SYNOPSIS

**#include \<firestring.h\>**\
 **-lfirestring**

**void \*firestring\_malloc(const size\_t** *size***)**

## DESCRIPTION

firestring\_malloc() acts exactly like [**malloc**(3)](/malloc/3.md) except that it detects malloc failures, prints an error and [**exit**(3)](/exit/3.md) with exit status EXIT\_FAILURE.  In most programs, malloc failures are unrecoverable, and this is the preferred behaviour.

## RETURN VALUE

If firestring\_malloc() returns, it **always** returns a new memory area of *size* bytes. It **never** returns *NULL.*

## AUTHOR

Ian Gulliver \<ian@penguinhosting.net\>

## SEE ALSO

[**libfirestring**(3)](/libfirestring/3.md)
