mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-27 19:08:58 +03:00
Ehooks: Add some debug zero and addr checks.
These help make sure that the ehooks return properly zeroed memory when required to.
This commit is contained in:
parent
4b2e5ee8b9
commit
a738a66b5c
2 changed files with 66 additions and 16 deletions
|
|
@ -821,13 +821,6 @@ extent_recycle(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks, eset_t *eset,
|
|||
ehooks_zero(tsdn, ehooks, addr, size,
|
||||
arena_ind_get(arena));
|
||||
}
|
||||
if (config_debug) {
|
||||
size_t *p = (size_t *)(uintptr_t)addr;
|
||||
/* Check the first page only. */
|
||||
for (size_t i = 0; i < PAGE / sizeof(size_t); i++) {
|
||||
assert(p[i] == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return extent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue