From 9754ccacfd37d34de8cfc23f6063932d20f450c7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 22 Apr 2005 21:18:59 +0000 Subject: [PATCH] ITS#3607 use shared memory when configured --- servers/slapd/back-bdb/init.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 ); -- 2.39.5