Functions for Managing Memory
Returns
This function returns a pointer to an array of the new copy of the
structures. If the structures cannot be duplicated, e.g., because of insufficient
virtual memory, the
Memory Concerns
The contents of the
berval
API function; see the Netscape LDAP SDK for C Programmer's Guide.
See Also
slapi_ch_bvdup()
ber_bvfree()
slapi_ch_calloc()
Allocates space for an array of a number of elements of a specified size.
Syntax
#include "slapi-plugin.h"
char * slapi_ch_calloc( unsigned long nelem, unsigned long size );
Parameters
This function takes the following parameters:
nelem
size
Returns
This function returns a pointer to the newly allocated space of memory. If space
cannot be allocated, e.g., no more virtual memory exists, the
terminates.
Memory Concerns
This function terminates the
if memory cannot be allocated. You should free the returned pointer by calling
slapi_build_control()
304
Netscape Directory Server Plug-in Programmer's Guide • October 2004
program terminates.
slapd
parameter are not altered by this function. The returned
v
structure should be freed by calling
Number of elements for which you want to allocate memory.
Size, in bytes, of the element for which you want to allocate
memory.
slapd
.
ber_bvfree()
server with an "out of memory" error message
berval
, which is an LDAP
program
slapd
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 7.0 - PLUG-IN and is the answer not in the manual?
Questions and answers