mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-27 02:57:21 +03:00
Refactor time_* into nstime_*.
Use a single uint64_t in nstime_t to store nanoseconds rather than using struct timespec. This reduces fragility around conversions between long and uint64_t, especially missing casts that only cause problems on 32-bit platforms.
This commit is contained in:
parent
788d29d397
commit
9bad079039
17 changed files with 526 additions and 557 deletions
|
|
@ -401,7 +401,7 @@ TEST_BEGIN(test_arena_i_decay_time)
|
|||
&decay_time, sizeof(ssize_t)), EFAULT,
|
||||
"Unexpected mallctl() success");
|
||||
|
||||
decay_time = TIME_SEC_MAX;
|
||||
decay_time = 0x7fffffff;
|
||||
assert_d_eq(mallctl("arena.0.decay_time", NULL, NULL,
|
||||
&decay_time, sizeof(ssize_t)), 0,
|
||||
"Unexpected mallctl() failure");
|
||||
|
|
@ -567,7 +567,7 @@ TEST_BEGIN(test_arenas_decay_time)
|
|||
&decay_time, sizeof(ssize_t)), EFAULT,
|
||||
"Unexpected mallctl() success");
|
||||
|
||||
decay_time = TIME_SEC_MAX;
|
||||
decay_time = 0x7fffffff;
|
||||
assert_d_eq(mallctl("arenas.decay_time", NULL, NULL,
|
||||
&decay_time, sizeof(ssize_t)), 0,
|
||||
"Expected mallctl() failure");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue