From: Kurt Zeilenga Date: Mon, 5 Aug 2002 21:10:48 +0000 (+0000) Subject: set BDB malloc function pointers X-Git-Tag: OPENLDAP_REL_ENG_2_1_4~71 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fdf606880702f90de13fc2bdc141d8f1a8afa18f;p=openldap set BDB malloc function pointers --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 2a80970a46..5a62a5f11d 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -34,6 +34,9 @@ static struct bdbi_database { struct berval bdb_uuid = { 0, NULL }; +typedef void * db_malloc(size_t); +typedef void * db_realloc(void *, size_t); + static int bdb_open( BackendInfo *bi ) { @@ -196,6 +199,9 @@ bdb_db_open( BackendDB *be ) return rc; } + bdb->bi_dbenv->set_alloc( bdb->bi_dbenv, (db_malloc *)ber_memalloc, + (db_realloc *)ber_memrealloc, ber_memfree ); + flags = DB_INIT_MPOOL | DB_THREAD | DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN;