[FEAT MERGE] del_tenant_memleak branch

Co-authored-by: HaHaJeff <jeffzhouhhh@gmail.com>
This commit is contained in:
obdev
2023-01-28 19:29:23 +08:00
committed by ob-robot
parent e3b89cd741
commit ba19ba90e0
179 changed files with 3235 additions and 2291 deletions

View File

@ -249,13 +249,15 @@ TEST_F(TestObjectMgr, TestSubObjectMgr)
int64_t total_size = fileInfo.st_size;
void *ptr = ::mmap(0, total_size, PROT_READ, MAP_SHARED, fd, 0);
abort_unless(ptr != MAP_FAILED);
SubObjectMgr som(false);
int64_t tenant_id = OB_SERVER_TENANT_ID;
int64_t ctx_id = ObCtxIds::DEFAULT_CTX_ID;
SubObjectMgr som(false, tenant_id, ctx_id);
ObMemAttr attr;
som.set_tenant_ctx_allocator(*ObMallocAllocator::get_instance()->get_tenant_ctx_allocator(
OB_SERVER_TENANT_ID, ObCtxIds::DEFAULT_CTX_ID), attr);
tenant_id, ctx_id).ref_allocator());
ObTenantResourceMgrHandle resource_handle;
ObResourceMgr::get_instance().get_tenant_resource_mgr(
OB_SERVER_TENANT_ID, resource_handle);
tenant_id, resource_handle);
map<int64_t, AObject*> allocs;
int i = total_size/sizeof(Record);
auto *rec = (Record*)ptr;