summaryrefslogtreecommitdiffstats
path: root/man3/nxt_unit_malloc.3
blob: 752fd4183bd3189074c297e7baef57251449133e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.\" (C) 2023, NGINX, Inc.
.\"
.TH nxt_unit_malloc 3 (date) "NGINX Unit (unreleased)"
.SH Name
nxt_unit_malloc \-
.MR malloc 3
wrapper with logging
.SH Library
NGINX Unit library
.RI ( libunit ", " -lunit )
.SH Synopsis
.nf
.B #include <nxt_unit.h>
.PP
.B [[gnu::malloc(nxt_unit_free)]]
.BI "void *_Nullable nxt_unit_malloc(nxt_unit_ctx_t *_Nullable " ctx ,
.BI "                                size_t " size );
.BI "void nxt_unit_free(nxt_unit_ctx_t *_Nullable " ctx ", void *_Nullable " ptr );
.fi
.SH Arguments
.TP
.I ctx
See
.MR nxt_unit_log 3 .
.TP
.I size
See
.MR malloc 3 .
.TP
.I ptr
See
.MR free 3 .
.SH Description
.MR nxt_unit_malloc 3
and
.MR nxt_unit_free 3
are equivalent to
.MR malloc 3
and
.MR free 3 ,
but log in the Unit debug log.
.SH Return value
See
.MR malloc 3 .
.SH Errors
Errors will be reported in the Unit debug log.
.IP \[bu] 3
.MR malloc 3
failed.
.SH Examples
See
.MR nxt_unit_init 3 .
.SH Copyright
(C) 2017-2023, NGINX, Inc.
.PP
SPDX-License-Identifier: Apache-2.0
.SH See also
.MR malloc 3 .
.PP
Website
.UR https://unit.nginx.org
.UE
.PP
Mailing list
.UR https://mailman.nginx.org/mailman/listinfo/unit
.UE
.PP
GitHub
.UR https://github.com/nginx/unit
.UE