mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-04 09:30:00 +03:00
Track the initialized state of nstime_t on debug build.
Some nstime_t operations require and assume the input nstime is initialized (e.g. nstime_update) -- uninitialized input may cause silent failures which is difficult to reproduce / debug. Add an explicit flag to track the state (limited to debug build only). Also fixed an use case in hpa (time of last_purge).
This commit is contained in:
parent
400c59895a
commit
cdabe908d0
3 changed files with 72 additions and 2 deletions
|
|
@ -203,6 +203,7 @@ hpa_shard_init(hpa_shard_t *shard, hpa_central_t *central, emap_t *emap,
|
|||
shard->opts = *opts;
|
||||
|
||||
shard->npending_purge = 0;
|
||||
nstime_init_zero(&shard->last_purge);
|
||||
|
||||
shard->stats.npurge_passes = 0;
|
||||
shard->stats.npurges = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue