The Samba-Bugzilla – Attachment 14509 Details for
Bug 13630
ldb: LMDB disabled on 32-bit systems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
256MB-on-32bit -> success
file_13630.txt (text/plain), 3.64 KB, created by
Mathieu Parent
on 2018-10-03 20:07:36 UTC
(
hide
)
Description:
256MB-on-32bit -> success
Filename:
MIME Type:
Creator:
Mathieu Parent
Created:
2018-10-03 20:07:36 UTC
Size:
3.64 KB
patch
obsolete
>From: Mathieu Parent <math.parent@gmail.com> >Date: Wed, 3 Oct 2018 05:18:08 +0000 >Subject: [PATCH] Reduce the LMDB size to 256MB on 32-bit > >https://bugzilla.samba.org/show_bug.cgi?id=13630 > >Signed-off-by: Mathieu Parent <math.parent@gmail.com> >--- > ldb_mdb/ldb_mdb.c | 8 +++++++- > wscript | 43 ++++++++++++++----------------------------- > 2 files changed, 21 insertions(+), 30 deletions(-) > >diff --git a/ldb_mdb/ldb_mdb.c b/ldb_mdb/ldb_mdb.c >index af552fe..388e423 100644 >--- a/ldb_mdb/ldb_mdb.c >+++ b/ldb_mdb/ldb_mdb.c >@@ -678,7 +678,13 @@ static int lmdb_open_env(TALLOC_CTX *mem_ctx, > unsigned int flags) > { > int ret; >+#if __SIZE_WIDTH__ == 64 > const size_t mmap_size = 8LL * GIGABYTE; >+#elif __SIZE_WIDTH__ == 32 >+ const size_t mmap_size = 256 * 1024*1024; >+#else >+#error Unsupported __SIZE_WIDTH__ >+#endif > unsigned int mdb_flags = MDB_NOSUBDIR|MDB_NOTLS; > /* > * MDB_NOSUBDIR implies there is a separate file called path and a >@@ -724,7 +730,7 @@ static int lmdb_open_env(TALLOC_CTX *mem_ctx, > } > > /* >- * Currently we set a 8Gb maximum database size >+ * Currently we set a 8Gb (256MB on 32-bit) maximum database size > * via the constant mmap_size above > */ > ret = mdb_env_set_mapsize(*env, mmap_size); >diff --git a/wscript b/wscript >index 1ea0fd9..d327103 100644 >--- a/wscript >+++ b/wscript >@@ -110,39 +110,24 @@ def configure(conf): > implied_deps='replace talloc tdb tevent'): > conf.define('USING_SYSTEM_LDB', 1) > >- if not conf.CHECK_CODE('return !(sizeof(size_t) >= 8)', >- "HAVE_64_BIT_SIZE_T_FOR_LMDB", >- execute=True, >- msg='Checking for a 64-bit host to ' >- 'support lmdb'): >- Logs.warn("--without-ldb-lmdb implied as this " >- "host is not 64-bit") >- >- if not conf.env.standalone_ldb and \ >- not Options.options.without_ad_dc and \ >- conf.CONFIG_GET('ENABLE_SELFTEST'): >- Logs.warn("NOTE: Some AD DC parts of selftest will fail") >- >+ if conf.env.standalone_ldb: >+ if Options.options.without_ldb_lmdb: >+ conf.env.REQUIRE_LMDB = False >+ else: >+ conf.env.REQUIRE_LMDB = True >+ elif Options.options.without_ad_dc: > conf.env.REQUIRE_LMDB = False > else: >- if conf.env.standalone_ldb: >- if Options.options.without_ldb_lmdb: >- conf.env.REQUIRE_LMDB = False >- else: >- conf.env.REQUIRE_LMDB = True >- elif Options.options.without_ad_dc: >+ if Options.options.without_ldb_lmdb: >+ if not Options.options.without_ad_dc and \ >+ conf.CONFIG_GET('ENABLE_SELFTEST'): >+ raise Utils.WafError('--without-ldb-lmdb conflicts ' >+ 'with --enable-selftest while ' >+ 'building the AD DC') >+ > conf.env.REQUIRE_LMDB = False > else: >- if Options.options.without_ldb_lmdb: >- if not Options.options.without_ad_dc and \ >- conf.CONFIG_GET('ENABLE_SELFTEST'): >- raise Utils.WafError('--without-ldb-lmdb conflicts ' >- 'with --enable-selftest while ' >- 'building the AD DC') >- >- conf.env.REQUIRE_LMDB = False >- else: >- conf.env.REQUIRE_LMDB = True >+ conf.env.REQUIRE_LMDB = True > > > if conf.CONFIG_SET('USING_SYSTEM_LDB'): >-- >2.19.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13630
:
14508
| 14509 |
14516