mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
[SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin
This commit is contained in:
committed by
Guangli Dai
parent
c7690e92da
commit
6016d86c18
@@ -65,10 +65,12 @@ create_test_data(const hpa_hooks_t *hooks, hpa_shard_opts_t *opts) {
|
||||
|
||||
err = hpa_central_init(&test_data->central, test_data->base, hooks);
|
||||
assert_false(err, "");
|
||||
|
||||
err = hpa_shard_init(&test_data->shard, &test_data->central,
|
||||
sec_opts_t sec_opts;
|
||||
sec_opts.nshards = 0;
|
||||
tsdn_t *tsdn = tsd_tsdn(tsd_fetch());
|
||||
err = hpa_shard_init(tsdn, &test_data->shard, &test_data->central,
|
||||
&test_data->emap, test_data->base, &test_data->shard_edata_cache,
|
||||
SHARD_IND, opts);
|
||||
SHARD_IND, opts, &sec_opts);
|
||||
assert_false(err, "");
|
||||
|
||||
return (hpa_shard_t *)test_data;
|
||||
|
||||
Reference in New Issue
Block a user