diff options
author | David Goldblatt <davidgoldblatt@fb.com> | 2017-04-25 01:05:15 (GMT) |
---|---|---|
committer | David Goldblatt <davidtgoldblatt@gmail.com> | 2017-04-25 16:51:38 (GMT) |
commit | 268843ac680f688582044621434221bedf78719b (patch) | |
tree | 5b68f6a50c54bf536c2d92c70f51deeae76d2476 /include | |
parent | dab4beb277f5fd82dd0f66324bb9a2c7458afe1c (diff) | |
download | jemalloc-268843ac680f688582044621434221bedf78719b.zip jemalloc-268843ac680f688582044621434221bedf78719b.tar.gz jemalloc-268843ac680f688582044621434221bedf78719b.tar.bz2 |
Header refactoring: pages.h - unify and remove from catchall.
Diffstat (limited to 'include')
-rw-r--r-- | include/jemalloc/internal/arena_externs.h | 1 | ||||
-rw-r--r-- | include/jemalloc/internal/extent_inlines.h | 1 | ||||
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal_includes.h | 2 | ||||
-rw-r--r-- | include/jemalloc/internal/pages.h (renamed from include/jemalloc/internal/pages_types.h) | 31 | ||||
-rw-r--r-- | include/jemalloc/internal/pages_externs.h | 29 |
5 files changed, 30 insertions, 34 deletions
diff --git a/include/jemalloc/internal/arena_externs.h b/include/jemalloc/internal/arena_externs.h index 1e13efd..7d56e44 100644 --- a/include/jemalloc/internal/arena_externs.h +++ b/include/jemalloc/internal/arena_externs.h @@ -1,6 +1,7 @@ #ifndef JEMALLOC_INTERNAL_ARENA_EXTERNS_H #define JEMALLOC_INTERNAL_ARENA_EXTERNS_H +#include "jemalloc/internal/pages.h" #include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/stats.h" diff --git a/include/jemalloc/internal/extent_inlines.h b/include/jemalloc/internal/extent_inlines.h index a73b653..e1f8bd9 100644 --- a/include/jemalloc/internal/extent_inlines.h +++ b/include/jemalloc/internal/extent_inlines.h @@ -1,6 +1,7 @@ #ifndef JEMALLOC_INTERNAL_EXTENT_INLINES_H #define JEMALLOC_INTERNAL_EXTENT_INLINES_H +#include "jemalloc/internal/pages.h" #include "jemalloc/internal/prng.h" #include "jemalloc/internal/ql.h" diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h index fb4105f..340cb1c 100644 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ b/include/jemalloc/internal/jemalloc_internal_includes.h @@ -48,7 +48,6 @@ #include "jemalloc/internal/base_types.h" #include "jemalloc/internal/arena_types.h" #include "jemalloc/internal/rtree_types.h" -#include "jemalloc/internal/pages_types.h" #include "jemalloc/internal/tcache_types.h" #include "jemalloc/internal/prof_types.h" @@ -81,7 +80,6 @@ #include "jemalloc/internal/base_externs.h" #include "jemalloc/internal/arena_externs.h" #include "jemalloc/internal/rtree_externs.h" -#include "jemalloc/internal/pages_externs.h" #include "jemalloc/internal/large_externs.h" #include "jemalloc/internal/tcache_externs.h" #include "jemalloc/internal/prof_externs.h" diff --git a/include/jemalloc/internal/pages_types.h b/include/jemalloc/internal/pages.h index e44ee2a..28383b7 100644 --- a/include/jemalloc/internal/pages_types.h +++ b/include/jemalloc/internal/pages.h @@ -1,5 +1,5 @@ -#ifndef JEMALLOC_INTERNAL_PAGES_TYPES_H -#define JEMALLOC_INTERNAL_PAGES_TYPES_H +#ifndef JEMALLOC_INTERNAL_PAGES_EXTERNS_H +#define JEMALLOC_INTERNAL_PAGES_EXTERNS_H /* Page size. LG_PAGE is determined by the configure script. */ #ifdef PAGE_MASK @@ -43,4 +43,29 @@ # define PAGES_CAN_PURGE_FORCED #endif -#endif /* JEMALLOC_INTERNAL_PAGES_TYPES_H */ +static const bool pages_can_purge_lazy = +#ifdef PAGES_CAN_PURGE_LAZY + true +#else + false +#endif + ; +static const bool pages_can_purge_forced = +#ifdef PAGES_CAN_PURGE_FORCED + true +#else + false +#endif + ; + +void *pages_map(void *addr, size_t size, size_t alignment, bool *commit); +void pages_unmap(void *addr, size_t size); +bool pages_commit(void *addr, size_t size); +bool pages_decommit(void *addr, size_t size); +bool pages_purge_lazy(void *addr, size_t size); +bool pages_purge_forced(void *addr, size_t size); +bool pages_huge(void *addr, size_t size); +bool pages_nohuge(void *addr, size_t size); +bool pages_boot(void); + +#endif /* JEMALLOC_INTERNAL_PAGES_EXTERNS_H */ diff --git a/include/jemalloc/internal/pages_externs.h b/include/jemalloc/internal/pages_externs.h deleted file mode 100644 index af9a01b..0000000 --- a/include/jemalloc/internal/pages_externs.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef JEMALLOC_INTERNAL_PAGES_EXTERNS_H -#define JEMALLOC_INTERNAL_PAGES_EXTERNS_H - -static const bool pages_can_purge_lazy = -#ifdef PAGES_CAN_PURGE_LAZY - true -#else - false -#endif - ; -static const bool pages_can_purge_forced = -#ifdef PAGES_CAN_PURGE_FORCED - true -#else - false -#endif - ; - -void *pages_map(void *addr, size_t size, size_t alignment, bool *commit); -void pages_unmap(void *addr, size_t size); -bool pages_commit(void *addr, size_t size); -bool pages_decommit(void *addr, size_t size); -bool pages_purge_lazy(void *addr, size_t size); -bool pages_purge_forced(void *addr, size_t size); -bool pages_huge(void *addr, size_t size); -bool pages_nohuge(void *addr, size_t size); -bool pages_boot(void); - -#endif /* JEMALLOC_INTERNAL_PAGES_EXTERNS_H */ |