1explain_realloc_or_die(3)  Library Functions Manual  explain_realloc_or_die(3)
2
3
4

NAME

6       explain_realloc_or_die  -  Allocate  and free dynamic memory and report
7       errors
8

SYNOPSIS

10       #include <libexplain/realloc.h>
11       void explain_realloc_or_die(void *ptr, size_t size);
12

DESCRIPTION

14       The explain_realloc_or_die function is used to call the realloc(3) sys‐
15       tem  call.   On  failure  an  explanation  will  be  printed to stderr,
16       obtained from explain_realloc(3), and then the  process  terminates  by
17       calling exit(EXIT_FAILURE).
18
19       This  function  is intended to be used in a fashion similar to the fol‐
20       lowing example:
21              void *new_ptr = explain_realloc_or_die(ptr, size);
22
23       ptr     The ptr, exactly as to be passed to the realloc(3) system call.
24
25       size    The size, exactly as to be  passed  to  the  realloc(3)  system
26               call.
27
28       Returns:
29               This  function  only returns on success.  On failure, prints an
30               explanation and exits.
31

SEE ALSO

33       realloc(3)
34               Allocate and free dynamic memory
35
36       explain_realloc(3)
37               explain realloc(3) errors
38
39       exit(2) terminate the calling process
40
42       libexplain version 1.4
43       Copyright (C) 2009 Peter Miller
44
45
46
47                                                     explain_realloc_or_die(3)
Impressum