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

NAME

6       explain_munmap_or_die  -  unmap a file or device from memory and report
7       errors
8

SYNOPSIS

10       #include <libexplain/munmap.h>
11       void explain_munmap_or_die(void *data, size_t data_size);
12       int explain_munmap_on_error(void *data, size_t data_size);
13

DESCRIPTION

15       The explain_munmap_or_die function is used to call the munmap(2) system
16       call.  On  failure  an  explanation will be printed to stderr, obtained
17       from the explain_munmap(3) function, and then the process terminates by
18       calling exit(EXIT_FAILURE).
19
20       The explain_munmap_on_error function is used to call the munmap(2) sys‐
21       tem call. On failure an explanation will be printed to stderr, obtained
22       from the explain_munmap(3) function, but still returns to the caller.
23
24       data    The data, exactly as to be passed to the munmap(2) system call.
25
26       data_size
27               The  data_size, exactly as to be passed to the munmap(2) system
28               call.
29

RETURN VALUE

31       The explain_munmap_or_die function only returns on  success,  see  mun‐
32       map(2)  for  more  information.  On  failure, prints an explanation and
33       exits, it does not return.
34
35       The explain_munmap_on_error function always returns the value return by
36       the wrapped munmap(2) system call.
37

EXAMPLE

39       The  explain_munmap_or_die function is intended to be used in a fashion
40       similar to the following example:
41              explain_munmap_or_die(data, data_size);
42

SEE ALSO

44       munmap(2)
45               unmap a file or device from memory
46
47       explain_munmap(3)
48               explain munmap(2) errors
49
50       exit(2) terminate the calling process
51
53       libexplain version 1.4
54       Copyright (C) 2010 Peter Miller
55
56
57
58                                                      explain_munmap_or_die(3)
Impressum