]> git.sur5r.net Git - openldap/blob - doc/man/man3/lber-memory.3
Happy New Year
[openldap] / doc / man / man3 / lber-memory.3
1 .TH LBER_MEMORY 3 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2018 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ber_memalloc, ber_memcalloc, ber_memrealloc, ber_memfree, ber_memvfree \- OpenLDAP LBER memory allocators
7 .SH LIBRARY
8 OpenLDAP LBER (liblber, \-llber)
9 .SH SYNOPSIS
10 .B #include <lber.h>
11 .LP
12 .BI "void *ber_memalloc(ber_len_t " bytes ");"
13 .LP
14 .BI "void *ber_memcalloc(ber_len_t " nelems ", ber_len_t " bytes ");"
15 .LP
16 .BI "void *ber_memrealloc(void *" ptr ", ber_len_t " bytes ");"
17 .LP
18 .BI "void ber_memfree(void *" ptr ");"
19 .LP
20 .BI "void ber_memvfree(void **" vec ");"
21 .SH DESCRIPTION
22 .LP
23 These routines are used to allocate/deallocate memory used/returned
24 by the Lightweight BER library as required by
25 .BR lber-encode (3)
26 and
27 .BR lber-decode (3).
28 .BR ber_memalloc (),
29 .BR ber_memcalloc (),
30 .BR ber_memrealloc (),
31 and
32 .BR ber_memfree ()
33 are used exactly like the standard
34 .BR malloc (3),
35 .BR calloc (3),
36 .BR realloc (3),
37 and
38 .BR free (3)
39 routines, respectively.  The
40 .BR ber_memvfree ()
41 routine is used to free a dynamically allocated array of pointers to
42 arbitrary dynamically allocated objects.
43 .SH SEE ALSO
44 .BR lber-decode (3),
45 .BR lber-encode (3),
46 .BR lber-types (3)
47 .LP
48 .SH ACKNOWLEDGEMENTS
49 .so ../Project