Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/jemalloc/include/jemalloc/internal/base_structs.h
#ifndef JEMALLOC_INTERNAL_BASE_STRUCTS_H | #ifndef JEMALLOC_INTERNAL_BASE_STRUCTS_H | ||||
#define JEMALLOC_INTERNAL_BASE_STRUCTS_H | #define JEMALLOC_INTERNAL_BASE_STRUCTS_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/size_classes.h" | #include "jemalloc/internal/sc.h" | ||||
/* Embedded at the beginning of every block of base-managed virtual memory. */ | /* Embedded at the beginning of every block of base-managed virtual memory. */ | ||||
struct base_block_s { | struct base_block_s { | ||||
/* Total size of block's virtual memory mapping. */ | /* Total size of block's virtual memory mapping. */ | ||||
size_t size; | size_t size; | ||||
/* Next block in list of base's blocks. */ | /* Next block in list of base's blocks. */ | ||||
base_block_t *next; | base_block_t *next; | ||||
Show All 26 Lines | struct base_s { | ||||
/* Serial number generation state. */ | /* Serial number generation state. */ | ||||
size_t extent_sn_next; | size_t extent_sn_next; | ||||
/* Chain of all blocks associated with base. */ | /* Chain of all blocks associated with base. */ | ||||
base_block_t *blocks; | base_block_t *blocks; | ||||
/* Heap of extents that track unused trailing space within blocks. */ | /* Heap of extents that track unused trailing space within blocks. */ | ||||
extent_heap_t avail[NSIZES]; | extent_heap_t avail[SC_NSIZES]; | ||||
/* Stats, only maintained if config_stats. */ | /* Stats, only maintained if config_stats. */ | ||||
size_t allocated; | size_t allocated; | ||||
size_t resident; | size_t resident; | ||||
size_t mapped; | size_t mapped; | ||||
/* Number of THP regions touched. */ | /* Number of THP regions touched. */ | ||||
size_t n_thp; | size_t n_thp; | ||||
}; | }; | ||||
#endif /* JEMALLOC_INTERNAL_BASE_STRUCTS_H */ | #endif /* JEMALLOC_INTERNAL_BASE_STRUCTS_H */ |