PA: Add a stats type.

This commit is contained in:
David Goldblatt 2020-03-08 13:08:15 -07:00 committed by David Goldblatt
parent 688fb3eb89
commit 32cb7c2f0b
6 changed files with 35 additions and 11 deletions

View file

@ -2,7 +2,8 @@
#include "jemalloc/internal/jemalloc_internal_includes.h"
bool
pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind) {
pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind,
pa_shard_stats_t *stats) {
/* This will change eventually, but for now it should hold. */
assert(base_ind_get(base) == ind);
/*
@ -37,5 +38,8 @@ pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind) {
return true;
}
shard->stats = stats;
memset(shard->stats, 0, sizeof(*shard->stats));
return false;
}