From: Howard Chu Date: Fri, 22 Apr 2005 21:18:59 +0000 (+0000) Subject: ITS#3607 use shared memory when configured X-Git-Tag: OPENLDAP_AC_BP~823 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9754ccacfd37d34de8cfc23f6063932d20f450c7;p=openldap ITS#3607 use shared memory when configured --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 755d419436..1b867440ef 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -110,6 +110,12 @@ bdb_do_recovery( BackendDB *be ) flags = DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN | DB_USE_ENVIRON | DB_RECOVER; + /* If a key was set, use shared memory for the BDB environment */ + if ( bdb->bi_shm_key ) { + re_dbenv->set_shm_key( re_dbenv, bdb->bi_shm_key ); + flags |= DB_SYSTEM_MEM; + } + /* Open the environment, which will also perform the recovery */ #ifdef HAVE_EBCDIC strcpy( path, bdb->bi_dbenv_home );