summaryrefslogtreecommitdiff
path: root/storage/tokudb/PerconaFT/portability/memory.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-01 21:55:30 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-02 10:09:44 +0100
commitd4df7bc9b1fbdfb5c98134091a9ff998af60954f (patch)
treedfd2f5128ccf94b6e86d2475aee23acf53fa868c /storage/tokudb/PerconaFT/portability/memory.cc
parent80d3eee072025f34984e474ea160651eac9e11e5 (diff)
parent96cb428b350ba48ee17ad9968d08f5318e48258c (diff)
downloadmariadb-git-d4df7bc9b1fbdfb5c98134091a9ff998af60954f.tar.gz
Merge branch 'github/10.0' into 10.1
Diffstat (limited to 'storage/tokudb/PerconaFT/portability/memory.cc')
-rw-r--r--storage/tokudb/PerconaFT/portability/memory.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/tokudb/PerconaFT/portability/memory.cc b/storage/tokudb/PerconaFT/portability/memory.cc
index 5430ff84b70..9594158cf38 100644
--- a/storage/tokudb/PerconaFT/portability/memory.cc
+++ b/storage/tokudb/PerconaFT/portability/memory.cc
@@ -104,7 +104,13 @@ toku_memory_startup(void) {
size_t lg_chunk; // log2 of the mmap threshold
size_t lg_chunk_length = sizeof lg_chunk;
result = mallctl_f("opt.lg_chunk", &lg_chunk, &lg_chunk_length, NULL, 0);
- if (result == 0)
+ if (result)
+ {
+ status.mmap_threshold = 1 << 21; // Default value.
+ // Incompatible jemalloc change.
+ result = 0;
+ }
+ else
status.mmap_threshold = 1 << lg_chunk;
}
}