47b20bb654
To avoid the high RSS caused by THP + low usage arena (i.e. THP becomes a significant percentage), added a new "auto" option which will only start using THP after a base allocator used up the first THP region. Starting from the second hugepage (in a single arena), "auto" behaves the same as "always", i.e. madvise hugepage right away.
14 lines
312 B
C
14 lines
312 B
C
#ifndef JEMALLOC_INTERNAL_BASE_INLINES_H
|
|
#define JEMALLOC_INTERNAL_BASE_INLINES_H
|
|
|
|
static inline unsigned
|
|
base_ind_get(const base_t *base) {
|
|
return base->ind;
|
|
}
|
|
|
|
static inline bool
|
|
metadata_thp_enabled(void) {
|
|
return (opt_metadata_thp != metadata_thp_disabled);
|
|
}
|
|
#endif /* JEMALLOC_INTERNAL_BASE_INLINES_H */
|