Header refactoring: unify and de-catchall extent_dss.
This commit is contained in:
parent
44f9bd147a
commit
93284bb53d
@ -1,6 +1,7 @@
|
|||||||
#ifndef JEMALLOC_INTERNAL_ARENA_EXTERNS_H
|
#ifndef JEMALLOC_INTERNAL_ARENA_EXTERNS_H
|
||||||
#define JEMALLOC_INTERNAL_ARENA_EXTERNS_H
|
#define JEMALLOC_INTERNAL_ARENA_EXTERNS_H
|
||||||
|
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/pages.h"
|
#include "jemalloc/internal/pages.h"
|
||||||
#include "jemalloc/internal/size_classes.h"
|
#include "jemalloc/internal/size_classes.h"
|
||||||
#include "jemalloc/internal/stats.h"
|
#include "jemalloc/internal/stats.h"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "jemalloc/internal/atomic.h"
|
#include "jemalloc/internal/atomic.h"
|
||||||
#include "jemalloc/internal/bitmap.h"
|
#include "jemalloc/internal/bitmap.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/jemalloc_internal_types.h"
|
#include "jemalloc/internal/jemalloc_internal_types.h"
|
||||||
#include "jemalloc/internal/mutex.h"
|
#include "jemalloc/internal/mutex.h"
|
||||||
#include "jemalloc/internal/nstime.h"
|
#include "jemalloc/internal/nstime.h"
|
||||||
|
26
include/jemalloc/internal/extent_dss.h
Normal file
26
include/jemalloc/internal/extent_dss.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef JEMALLOC_INTERNAL_EXTENT_DSS_H
|
||||||
|
#define JEMALLOC_INTERNAL_EXTENT_DSS_H
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
dss_prec_disabled = 0,
|
||||||
|
dss_prec_primary = 1,
|
||||||
|
dss_prec_secondary = 2,
|
||||||
|
|
||||||
|
dss_prec_limit = 3
|
||||||
|
} dss_prec_t;
|
||||||
|
#define DSS_PREC_DEFAULT dss_prec_secondary
|
||||||
|
#define DSS_DEFAULT "secondary"
|
||||||
|
|
||||||
|
extern const char *dss_prec_names[];
|
||||||
|
|
||||||
|
extern const char *opt_dss;
|
||||||
|
|
||||||
|
dss_prec_t extent_dss_prec_get(void);
|
||||||
|
bool extent_dss_prec_set(dss_prec_t dss_prec);
|
||||||
|
void *extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr,
|
||||||
|
size_t size, size_t alignment, bool *zero, bool *commit);
|
||||||
|
bool extent_in_dss(void *addr);
|
||||||
|
bool extent_dss_mergeable(void *addr_a, void *addr_b);
|
||||||
|
void extent_dss_boot(void);
|
||||||
|
|
||||||
|
#endif /* JEMALLOC_INTERNAL_EXTENT_DSS_H */
|
@ -1,14 +0,0 @@
|
|||||||
#ifndef JEMALLOC_INTERNAL_EXTENT_DSS_EXTERNS_H
|
|
||||||
#define JEMALLOC_INTERNAL_EXTENT_DSS_EXTERNS_H
|
|
||||||
|
|
||||||
extern const char *opt_dss;
|
|
||||||
|
|
||||||
dss_prec_t extent_dss_prec_get(void);
|
|
||||||
bool extent_dss_prec_set(dss_prec_t dss_prec);
|
|
||||||
void *extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr,
|
|
||||||
size_t size, size_t alignment, bool *zero, bool *commit);
|
|
||||||
bool extent_in_dss(void *addr);
|
|
||||||
bool extent_dss_mergeable(void *addr_a, void *addr_b);
|
|
||||||
void extent_dss_boot(void);
|
|
||||||
|
|
||||||
#endif /* JEMALLOC_INTERNAL_EXTENT_DSS_EXTERNS_H */
|
|
@ -1,6 +0,0 @@
|
|||||||
#ifndef JEMALLOC_INTERNAL_EXTENT_DSS_STRUCTS_H
|
|
||||||
#define JEMALLOC_INTERNAL_EXTENT_DSS_STRUCTS_H
|
|
||||||
|
|
||||||
extern const char *dss_prec_names[];
|
|
||||||
|
|
||||||
#endif /* JEMALLOC_INTERNAL_EXTENT_DSS_STRUCTS_H */
|
|
@ -1,14 +0,0 @@
|
|||||||
#ifndef JEMALLOC_INTERNAL_EXTENT_DSS_TYPES_H
|
|
||||||
#define JEMALLOC_INTERNAL_EXTENT_DSS_TYPES_H
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
dss_prec_disabled = 0,
|
|
||||||
dss_prec_primary = 1,
|
|
||||||
dss_prec_secondary = 2,
|
|
||||||
|
|
||||||
dss_prec_limit = 3
|
|
||||||
} dss_prec_t;
|
|
||||||
#define DSS_PREC_DEFAULT dss_prec_secondary
|
|
||||||
#define DSS_DEFAULT "secondary"
|
|
||||||
|
|
||||||
#endif /* JEMALLOC_INTERNAL_EXTENT_DSS_TYPES_H */
|
|
@ -41,7 +41,6 @@
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
#include "jemalloc/internal/extent_types.h"
|
#include "jemalloc/internal/extent_types.h"
|
||||||
#include "jemalloc/internal/extent_dss_types.h"
|
|
||||||
#include "jemalloc/internal/base_types.h"
|
#include "jemalloc/internal/base_types.h"
|
||||||
#include "jemalloc/internal/arena_types.h"
|
#include "jemalloc/internal/arena_types.h"
|
||||||
#include "jemalloc/internal/tcache_types.h"
|
#include "jemalloc/internal/tcache_types.h"
|
||||||
@ -54,7 +53,6 @@
|
|||||||
#include "jemalloc/internal/mutex_pool_structs.h"
|
#include "jemalloc/internal/mutex_pool_structs.h"
|
||||||
#include "jemalloc/internal/arena_structs_a.h"
|
#include "jemalloc/internal/arena_structs_a.h"
|
||||||
#include "jemalloc/internal/extent_structs.h"
|
#include "jemalloc/internal/extent_structs.h"
|
||||||
#include "jemalloc/internal/extent_dss_structs.h"
|
|
||||||
#include "jemalloc/internal/base_structs.h"
|
#include "jemalloc/internal/base_structs.h"
|
||||||
#include "jemalloc/internal/prof_structs.h"
|
#include "jemalloc/internal/prof_structs.h"
|
||||||
#include "jemalloc/internal/arena_structs_b.h"
|
#include "jemalloc/internal/arena_structs_b.h"
|
||||||
@ -67,7 +65,6 @@
|
|||||||
|
|
||||||
#include "jemalloc/internal/jemalloc_internal_externs.h"
|
#include "jemalloc/internal/jemalloc_internal_externs.h"
|
||||||
#include "jemalloc/internal/extent_externs.h"
|
#include "jemalloc/internal/extent_externs.h"
|
||||||
#include "jemalloc/internal/extent_dss_externs.h"
|
|
||||||
#include "jemalloc/internal/extent_mmap_externs.h"
|
#include "jemalloc/internal/extent_mmap_externs.h"
|
||||||
#include "jemalloc/internal/base_externs.h"
|
#include "jemalloc/internal/base_externs.h"
|
||||||
#include "jemalloc/internal/arena_externs.h"
|
#include "jemalloc/internal/arena_externs.h"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||||
|
|
||||||
#include "jemalloc/internal/assert.h"
|
#include "jemalloc/internal/assert.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/mutex.h"
|
#include "jemalloc/internal/mutex.h"
|
||||||
#include "jemalloc/internal/rtree.h"
|
#include "jemalloc/internal/rtree.h"
|
||||||
#include "jemalloc/internal/size_classes.h"
|
#include "jemalloc/internal/size_classes.h"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "jemalloc/internal/assert.h"
|
#include "jemalloc/internal/assert.h"
|
||||||
#include "jemalloc/internal/ctl.h"
|
#include "jemalloc/internal/ctl.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/mutex.h"
|
#include "jemalloc/internal/mutex.h"
|
||||||
#include "jemalloc/internal/nstime.h"
|
#include "jemalloc/internal/nstime.h"
|
||||||
#include "jemalloc/internal/size_classes.h"
|
#include "jemalloc/internal/size_classes.h"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||||
|
|
||||||
#include "jemalloc/internal/assert.h"
|
#include "jemalloc/internal/assert.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/ph.h"
|
#include "jemalloc/internal/ph.h"
|
||||||
#include "jemalloc/internal/rtree.h"
|
#include "jemalloc/internal/rtree.h"
|
||||||
#include "jemalloc/internal/mutex.h"
|
#include "jemalloc/internal/mutex.h"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||||
|
|
||||||
#include "jemalloc/internal/assert.h"
|
#include "jemalloc/internal/assert.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/spin.h"
|
#include "jemalloc/internal/spin.h"
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "jemalloc/internal/assert.h"
|
#include "jemalloc/internal/assert.h"
|
||||||
#include "jemalloc/internal/atomic.h"
|
#include "jemalloc/internal/atomic.h"
|
||||||
#include "jemalloc/internal/ctl.h"
|
#include "jemalloc/internal/ctl.h"
|
||||||
|
#include "jemalloc/internal/extent_dss.h"
|
||||||
#include "jemalloc/internal/jemalloc_internal_types.h"
|
#include "jemalloc/internal/jemalloc_internal_types.h"
|
||||||
#include "jemalloc/internal/malloc_io.h"
|
#include "jemalloc/internal/malloc_io.h"
|
||||||
#include "jemalloc/internal/mutex.h"
|
#include "jemalloc/internal/mutex.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user