Emap: Move in iealloc.
This is logically scoped to the emap.
This commit is contained in:
committed by
David Goldblatt
parent
1d449bd9a6
commit
9b5d105fc3
@@ -62,12 +62,12 @@ thd_start(void *varg) {
|
||||
ptr = mallocx(1, MALLOCX_TCACHE_NONE);
|
||||
ptr2 = mallocx(129, MALLOCX_TCACHE_NONE);
|
||||
|
||||
edata = iealloc(tsdn, ptr);
|
||||
edata = emap_lookup(tsdn, &emap_global, ptr);
|
||||
shard1 = edata_binshard_get(edata);
|
||||
dallocx(ptr, 0);
|
||||
assert_u_lt(shard1, 16, "Unexpected bin shard used");
|
||||
|
||||
edata = iealloc(tsdn, ptr2);
|
||||
edata = emap_lookup(tsdn, &emap_global, ptr2);
|
||||
shard2 = edata_binshard_get(edata);
|
||||
dallocx(ptr2, 0);
|
||||
assert_u_lt(shard2, 4, "Unexpected bin shard used");
|
||||
|
@@ -101,7 +101,7 @@ TEST_END
|
||||
|
||||
static void confirm_malloc(tsd_t *tsd, void *p) {
|
||||
assert_ptr_not_null(p, "malloc failed unexpectedly");
|
||||
edata_t *e = iealloc(TSDN_NULL, p);
|
||||
edata_t *e = emap_lookup(TSDN_NULL, &emap_global, p);
|
||||
assert_ptr_not_null(e, "NULL edata for living pointer");
|
||||
malloc_mutex_lock(tsd_tsdn(tsd), &prof_recent_alloc_mtx);
|
||||
prof_recent_t *n = edata_prof_recent_alloc_get(tsd, e);
|
||||
|
Reference in New Issue
Block a user