aboutsummaryrefslogtreecommitdiff
path: root/examples/redis-unstable/deps/jemalloc/src/extent_mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/redis-unstable/deps/jemalloc/src/extent_mmap.c')
-rw-r--r--examples/redis-unstable/deps/jemalloc/src/extent_mmap.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/examples/redis-unstable/deps/jemalloc/src/extent_mmap.c b/examples/redis-unstable/deps/jemalloc/src/extent_mmap.c
deleted file mode 100644
index 5f0ee2d..0000000
--- a/examples/redis-unstable/deps/jemalloc/src/extent_mmap.c
+++ /dev/null
@@ -1,41 +0,0 @@
1#include "jemalloc/internal/jemalloc_preamble.h"
2#include "jemalloc/internal/jemalloc_internal_includes.h"
3
4#include "jemalloc/internal/assert.h"
5#include "jemalloc/internal/extent_mmap.h"
6
7/******************************************************************************/
8/* Data. */
9
10bool opt_retain =
11#ifdef JEMALLOC_RETAIN
12 true
13#else
14 false
15#endif
16 ;
17
18/******************************************************************************/
19
20void *
21extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero,
22 bool *commit) {
23 assert(alignment == ALIGNMENT_CEILING(alignment, PAGE));
24 void *ret = pages_map(new_addr, size, alignment, commit);
25 if (ret == NULL) {
26 return NULL;
27 }
28 assert(ret != NULL);
29 if (*commit) {
30 *zero = true;
31 }
32 return ret;
33}
34
35bool
36extent_dalloc_mmap(void *addr, size_t size) {
37 if (!opt_retain) {
38 pages_unmap(addr, size);
39 }
40 return opt_retain;
41}