Differential D24522 Diff 70932 head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h
Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h
#ifndef JEMALLOC_INTERNAL_BACKGROUND_THREAD_STRUCTS_H | #ifndef JEMALLOC_INTERNAL_BACKGROUND_THREAD_STRUCTS_H | ||||
#define JEMALLOC_INTERNAL_BACKGROUND_THREAD_STRUCTS_H | #define JEMALLOC_INTERNAL_BACKGROUND_THREAD_STRUCTS_H | ||||
/* This file really combines "structs" and "types", but only transitionally. */ | /* This file really combines "structs" and "types", but only transitionally. */ | ||||
#if defined(JEMALLOC_BACKGROUND_THREAD) || defined(JEMALLOC_LAZY_LOCK) | #if defined(JEMALLOC_BACKGROUND_THREAD) || defined(JEMALLOC_LAZY_LOCK) | ||||
# define JEMALLOC_PTHREAD_CREATE_WRAPPER | # define JEMALLOC_PTHREAD_CREATE_WRAPPER | ||||
#endif | #endif | ||||
#define BACKGROUND_THREAD_INDEFINITE_SLEEP UINT64_MAX | #define BACKGROUND_THREAD_INDEFINITE_SLEEP UINT64_MAX | ||||
#define MAX_BACKGROUND_THREAD_LIMIT MALLOCX_ARENA_LIMIT | #define MAX_BACKGROUND_THREAD_LIMIT MALLOCX_ARENA_LIMIT | ||||
#define DEFAULT_NUM_BACKGROUND_THREAD 4 | |||||
typedef enum { | typedef enum { | ||||
background_thread_stopped, | background_thread_stopped, | ||||
background_thread_started, | background_thread_started, | ||||
/* Thread waits on the global lock when paused (for arena_reset). */ | /* Thread waits on the global lock when paused (for arena_reset). */ | ||||
background_thread_paused, | background_thread_paused, | ||||
} background_thread_state_t; | } background_thread_state_t; | ||||
Show All 34 Lines |