PA: Parameterize emap. Move emap_global to arena.

This lets us test the PA module without interfering with the global emap used by
the real allocator (the one not under test).
This commit is contained in:
David Goldblatt 2020-03-14 10:49:34 -07:00 committed by David Goldblatt
parent f730577277
commit 294b276fc7
19 changed files with 211 additions and 184 deletions

View file

@ -202,7 +202,7 @@ void *
large_ralloc(tsdn_t *tsdn, arena_t *arena, void *ptr, size_t usize,
size_t alignment, bool zero, tcache_t *tcache,
hook_ralloc_args_t *hook_args) {
edata_t *edata = emap_edata_lookup(tsdn, &emap_global, ptr);
edata_t *edata = emap_edata_lookup(tsdn, &arena_emap_global, ptr);
size_t oldusize = edata_usize_get(edata);
/* The following should have been caught by callers. */