MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Functions
Alloc.hxx File Reference
`#include "Compiler.h"`
`#include <stddef.h>`
Include dependency graph for Alloc.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
gcc_malloc void * | xalloc (size_t size)
| Allocate memory. More...
gcc_malloc gcc_nonnull_all void * | xmemdup (const void *s, size_t size)
| Duplicate memory. More...
gcc_malloc gcc_nonnull_all char * | xstrdup (const char *s)
| Duplicate a string. More...
gcc_malloc gcc_nonnull_all char * | xstrndup (const char *s, size_t n)
| Duplicate a string. More...
gcc_malloc gcc_nonnull_all char * | xstrcatdup (const char *a, const char *b)
| Concatenate two strings, returning a new allocation. More...
gcc_malloc gcc_nonnull_all char * | xstrcatdup (const char *a, const char *b, const char *c)
gcc_malloc gcc_nonnull_all char * | xstrcatdup (const char *a, const char *b, const char *c, const char *d)

## Function Documentation

gcc_malloc void* xalloc | ( | size_t | size | ) |

Allocate memory.

Use free() to free it.

This function never fails; in out-of-memory situations, it aborts the process.

gcc_malloc gcc_nonnull_all void* xmemdup | ( | const void * | s,
|  | size_t | size
| ) |  |

Duplicate memory.

Use free() to free it.

This function never fails; in out-of-memory situations, it aborts the process.

gcc_malloc gcc_nonnull_all char* xstrcatdup | ( | const char * | a,
|  | const char * | b
| ) |  |

Concatenate two strings, returning a new allocation.

Use free() to free it.

This function never fails; in out-of-memory situations, it aborts the process.

gcc_malloc gcc_nonnull_all char* xstrcatdup | ( | const char * | a,
|  | const char * | b,
|  | const char * | c
| ) |  |

gcc_malloc gcc_nonnull_all char* xstrcatdup | ( | const char * | a,
|  | const char * | b,
|  | const char * | c,
|  | const char * | d
| ) |  |

gcc_malloc gcc_nonnull_all char* xstrdup | ( | const char * | s | ) |

Duplicate a string.

Use free() to free it.

This function never fails; in out-of-memory situations, it aborts the process.

gcc_malloc gcc_nonnull_all char* xstrndup | ( | const char * | s,
|  | size_t | n
| ) |  |

Duplicate a string.

Use free() to free it.

This function never fails; in out-of-memory situations, it aborts the process.