mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 08:33:38 +03:00
Fix the time-since computation in HPA.
nstime module guarantees monotonic clock update within a single nstime_t. This means, if two separate nstime_t variables are read and updated separately, nstime_subtract between them may result in underflow. Fixed by switching to the time since utility provided by nstime.
This commit is contained in:
parent
310af725b0
commit
837b37c4ce
4 changed files with 22 additions and 15 deletions
|
|
@ -9,6 +9,7 @@ struct hpa_hooks_s {
|
|||
void (*hugify)(void *ptr, size_t size);
|
||||
void (*dehugify)(void *ptr, size_t size);
|
||||
void (*curtime)(nstime_t *r_time, bool first_reading);
|
||||
uint64_t (*ms_since)(nstime_t *r_time);
|
||||
};
|
||||
|
||||
extern hpa_hooks_t hpa_hooks_default;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue