mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
library use: LBER_ macros expand to system routines. LDAP_ macros expand to new ber_ allocators. Add ber_ and ldap_ memory allocators/deallocator: ber_ routines are wrappers of LBER_ macros. ldap_ routines are wrappers of ber_ routines. Removed safe_realloc() macro from various files. This issue (if an issue) should be resolved across whole package. ldapmodify.c now uses ber_ allocators to resolve ber_bvfree() vs. WIN32 multiple heaps issue. These changes should facilate implementation of ber_set_option( NULL, LBER_OPT_MEMORY_FN, ...) and ldap_set_option( NULL, LDAP_OPT_MEMORY_FN, ...).
34 lines
461 B
C
34 lines
461 B
C
/*
|
|
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
*/
|
|
#include "portable.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "lber-int.h"
|
|
|
|
void
|
|
ber_memfree( void *p )
|
|
{
|
|
LBER_FREE( p );
|
|
}
|
|
|
|
void *
|
|
ber_memalloc( size_t s )
|
|
{
|
|
return LBER_MALLOC( s );
|
|
}
|
|
|
|
void *
|
|
ber_memcalloc( size_t n, size_t s )
|
|
{
|
|
return LBER_CALLOC( n, s );
|
|
}
|
|
|
|
void *
|
|
ber_memrealloc( void* p, size_t s )
|
|
{
|
|
return LBER_REALLOC( p, s );
|
|
}
|
|
|