|
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | STANDARDS | NOTES |
darenadestroy dmalloc API functions manual darenadestroy
darenadestroy - destroys an arena.
#include "dmalloc.h"
int darenadestroy(darena_t *arena);
The function darenastroy() destroys the arena pointed to by arena. If
arena is NULL, darenadestroy() just returns 0. arena must be a pointer
to an arena previously initialized by darenainit(). If not, it causes
undefined behaviour.
On success, darenadestroy() returns 0. On failure, it returns -1, and
sets errno.
darenadestroy() can only fail in multi-threaded applications with one of
the following errors:
EBUSY Device or resource busy. darenadestroy() was called upon an
arena owned by another thread.
EINVAL Invalid argument. darenadestroy() was called upon an arena that
had not been properly initialized.
For an explanation of the terms used in this section, see attributes(7).
┌────────────────────────────────────┬───────────────┬───────────┐
│ Interface │ Attribute │ Value │
├────────────────────────────────────┼───────────────┼───────────┤
│ darenadestroy() │ Thread safety │ MT-Safe │
└────────────────────────────────────┴───────────────┴───────────┘
None.
It is not mandatory to destroy an arena at the end of an application,
especially in a single threaded one. However, it is necessary in
multi-threaded applications, when the one intends to reuse the backing
memory that had been initialized to that arena.
dmalloc API functions manual 2026-04-13 darenadestroy