]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#1994, Windows heap consistency
authorHoward Chu <hyc@openldap.org>
Sat, 3 Aug 2002 02:57:52 +0000 (02:57 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 3 Aug 2002 02:57:52 +0000 (02:57 +0000)
servers/slapd/back-bdb/init.c

index 2a80970a46c48604c006ef59ea8523e5109a5e35..5a62a5f11d84b5e06d8bd0d75c530749d8f624e4 100644 (file)
@@ -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;