mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 09:03:33 +03:00
Define PROF_TCTX_SENTINEL instead of using magic numbers
This makes the code more readable on its own, and also sets the stage for more cleanly handling the pointer provenance lints in a following commit.
This commit is contained in:
parent
c49c17f128
commit
7e54dd1ddb
7 changed files with 39 additions and 24 deletions
|
|
@ -287,7 +287,7 @@ large_prof_info_get(tsd_t *tsd, edata_t *edata, prof_info_t *prof_info,
|
|||
prof_tctx_t *alloc_tctx = edata_prof_tctx_get(edata);
|
||||
prof_info->alloc_tctx = alloc_tctx;
|
||||
|
||||
if ((uintptr_t)alloc_tctx > (uintptr_t)1U) {
|
||||
if (prof_tctx_is_valid(alloc_tctx)) {
|
||||
nstime_copy(&prof_info->alloc_time,
|
||||
edata_prof_alloc_time_get(edata));
|
||||
prof_info->alloc_size = edata_prof_alloc_size_get(edata);
|
||||
|
|
@ -308,7 +308,7 @@ large_prof_tctx_set(edata_t *edata, prof_tctx_t *tctx) {
|
|||
|
||||
void
|
||||
large_prof_tctx_reset(edata_t *edata) {
|
||||
large_prof_tctx_set(edata, (prof_tctx_t *)(uintptr_t)1U);
|
||||
large_prof_tctx_set(edata, PROF_TCTX_SENTINEL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue