From 98774e64a4696c7bce6d2317aa59fe5b39bba69f Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Tue, 23 May 2017 14:42:32 -0700 Subject: Header refactoring: unify and de-catchall extent_mmap module. --- include/jemalloc/internal/extent_mmap.h | 10 ++++++++++ include/jemalloc/internal/extent_mmap_externs.h | 10 ---------- include/jemalloc/internal/jemalloc_internal_includes.h | 1 - src/arena.c | 1 + src/base.c | 1 + src/ctl.c | 1 + src/extent.c | 1 + src/extent_mmap.c | 1 + src/jemalloc.c | 1 + src/large.c | 1 + test/unit/arena_reset.c | 1 + 11 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 include/jemalloc/internal/extent_mmap.h delete mode 100644 include/jemalloc/internal/extent_mmap_externs.h diff --git a/include/jemalloc/internal/extent_mmap.h b/include/jemalloc/internal/extent_mmap.h new file mode 100644 index 0000000..55f17ee --- /dev/null +++ b/include/jemalloc/internal/extent_mmap.h @@ -0,0 +1,10 @@ +#ifndef JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H +#define JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H + +extern bool opt_retain; + +void *extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, + bool *zero, bool *commit); +bool extent_dalloc_mmap(void *addr, size_t size); + +#endif /* JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H */ diff --git a/include/jemalloc/internal/extent_mmap_externs.h b/include/jemalloc/internal/extent_mmap_externs.h deleted file mode 100644 index fe9a79a..0000000 --- a/include/jemalloc/internal/extent_mmap_externs.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H -#define JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H - -extern bool opt_retain; - -void *extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, - bool *zero, bool *commit); -bool extent_dalloc_mmap(void *addr, size_t size); - -#endif /* JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H */ diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h index 71c856b..837e9e4 100644 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ b/include/jemalloc/internal/jemalloc_internal_includes.h @@ -65,7 +65,6 @@ #include "jemalloc/internal/jemalloc_internal_externs.h" #include "jemalloc/internal/extent_externs.h" -#include "jemalloc/internal/extent_mmap_externs.h" #include "jemalloc/internal/base_externs.h" #include "jemalloc/internal/arena_externs.h" #include "jemalloc/internal/large_externs.h" diff --git a/src/arena.c b/src/arena.c index 0135895..bf1d6e6 100644 --- a/src/arena.c +++ b/src/arena.c @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/extent_dss.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/rtree.h" #include "jemalloc/internal/size_classes.h" diff --git a/src/base.c b/src/base.c index 892c28d..498e5c9 100644 --- a/src/base.c +++ b/src/base.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/mutex.h" /******************************************************************************/ diff --git a/src/ctl.c b/src/ctl.c index e81ca41..33275d7 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -5,6 +5,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/extent_dss.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/nstime.h" #include "jemalloc/internal/size_classes.h" diff --git a/src/extent.c b/src/extent.c index 0929aee..6589de5 100644 --- a/src/extent.c +++ b/src/extent.c @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/extent_dss.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/ph.h" #include "jemalloc/internal/rtree.h" #include "jemalloc/internal/mutex.h" diff --git a/src/extent_mmap.c b/src/extent_mmap.c index 3e4e1ef..8d607dc 100644 --- a/src/extent_mmap.c +++ b/src/extent_mmap.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/extent_mmap.h" /******************************************************************************/ /* Data. */ diff --git a/src/jemalloc.c b/src/jemalloc.c index 32f4a4c..1befb64 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -6,6 +6,7 @@ #include "jemalloc/internal/atomic.h" #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/extent_dss.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/mutex.h" diff --git a/src/large.c b/src/large.c index 27c9bc6..79d2c9d 100644 --- a/src/large.c +++ b/src/large.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/rtree.h" #include "jemalloc/internal/util.h" diff --git a/test/unit/arena_reset.c b/test/unit/arena_reset.c index 678ae57..958453d 100644 --- a/test/unit/arena_reset.c +++ b/test/unit/arena_reset.c @@ -2,6 +2,7 @@ #include "test/jemalloc_test.h" #endif +#include "jemalloc/internal/extent_mmap.h" #include "jemalloc/internal/rtree.h" #include "test/extent_hooks.h" -- cgit v0.12