2002-06-13 11:59:10 +08:00
|
|
|
.TH LBER_MEMORY 3 "RELEASEDATE" "OpenLDAP LDVERSION"
|
2000-07-14 06:56:16 +08:00
|
|
|
.\" $OpenLDAP$
|
2002-01-05 05:17:25 +08:00
|
|
|
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
|
2000-07-14 06:56:16 +08:00
|
|
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
|
|
|
.SH NAME
|
2002-01-25 20:34:57 +08:00
|
|
|
ber_memalloc, ber_memcalloc, ber_memrealloc, ber_memfree, ber_memvfree \- LBER memory allocators
|
2002-06-21 15:32:54 +08:00
|
|
|
.SH LIBRARY
|
2002-06-22 05:25:38 +08:00
|
|
|
OpenLDAP LBER (liblber, -llber)
|
2000-07-14 06:56:16 +08:00
|
|
|
.SH SYNOPSIS
|
2002-01-25 20:34:57 +08:00
|
|
|
.B #include <lber.h>
|
2000-07-14 06:56:16 +08:00
|
|
|
.LP
|
2002-01-25 20:34:57 +08:00
|
|
|
.BI "void *ber_memalloc(ber_len_t " bytes ");"
|
|
|
|
.LP
|
|
|
|
.BI "void *ber_memcalloc(ber_len_t " nelems ", ber_len_t " bytes ");"
|
|
|
|
.LP
|
|
|
|
.BI "void *ber_memrealloc(void *" ptr ", ber_len_t " bytes ");"
|
|
|
|
.LP
|
|
|
|
.BI "void ber_memfree(void *" ptr ");"
|
|
|
|
.LP
|
|
|
|
.BI "void ber_memvfree(void **" vec ");"
|
2000-07-14 06:56:16 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.LP
|
|
|
|
These routines are used to allocate/deallocate memory used/returned
|
|
|
|
by the Lightweight BER library as required by
|
|
|
|
.BR lber-encode (3)
|
|
|
|
and
|
|
|
|
.BR lber-decode (3).
|
2002-01-25 20:34:57 +08:00
|
|
|
.BR ber_memalloc (),
|
|
|
|
.BR ber_memcalloc (),
|
|
|
|
.BR ber_memrealloc (),
|
|
|
|
and
|
|
|
|
.BR ber_memfree ()
|
|
|
|
are used exactly like the standard
|
|
|
|
.BR malloc (3),
|
|
|
|
.BR calloc (3),
|
|
|
|
.BR realloc (3),
|
|
|
|
and
|
2002-05-09 10:07:41 +08:00
|
|
|
.BR free (3)
|
2002-01-25 20:34:57 +08:00
|
|
|
routines, respectively. The
|
|
|
|
.BR ber_memvfree ()
|
|
|
|
routine is used to free a dynamically allocated array of pointers to
|
|
|
|
arbitrary dynamically allocated objects.
|
2000-07-14 06:56:16 +08:00
|
|
|
.SH SEE ALSO
|
2002-05-09 10:07:41 +08:00
|
|
|
.BR lber-decode (3),
|
|
|
|
.BR lber-encode (3),
|
2000-07-14 06:56:16 +08:00
|
|
|
.BR lber-types (3)
|
|
|
|
.LP
|
|
|
|
.SH ACKNOWLEDGEMENTS
|
|
|
|
.B OpenLDAP
|
|
|
|
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
|
|
|
|
.B OpenLDAP
|
|
|
|
is derived from University of Michigan LDAP 3.3 Release.
|