PA: Add ehook-getting support.
This commit is contained in:
parent
eba35e2e48
commit
7624043a41
@ -1,6 +1,7 @@
|
||||
#ifndef JEMALLOC_INTERNAL_PA_H
|
||||
#define JEMALLOC_INTERNAL_PA_H
|
||||
|
||||
#include "jemalloc/internal/base.h"
|
||||
#include "jemalloc/internal/decay.h"
|
||||
#include "jemalloc/internal/ecache.h"
|
||||
#include "jemalloc/internal/edata_cache.h"
|
||||
@ -80,6 +81,9 @@ struct pa_shard_s {
|
||||
*/
|
||||
decay_t decay_dirty; /* dirty --> muzzy */
|
||||
decay_t decay_muzzy; /* muzzy --> retained */
|
||||
|
||||
/* The base from which we get the ehooks and allocate metadat. */
|
||||
base_t *base;
|
||||
};
|
||||
|
||||
static inline void
|
||||
@ -105,6 +109,11 @@ pa_shard_may_force_decay(pa_shard_t *shard) {
|
||||
|| pa_shard_muzzy_decay_ms_get(shard) == -1);
|
||||
}
|
||||
|
||||
static inline ehooks_t *
|
||||
pa_shard_ehooks_get(pa_shard_t *shard) {
|
||||
return base_ehooks_get(shard->base);
|
||||
}
|
||||
|
||||
/* Returns true on error. */
|
||||
bool pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind,
|
||||
pa_shard_stats_t *stats, malloc_mutex_t *stats_mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user