diff --git a/deps/oblib/src/lib/alloc/ob_malloc_allocator.cpp b/deps/oblib/src/lib/alloc/ob_malloc_allocator.cpp index ab79a624a..c101d8b7a 100644 --- a/deps/oblib/src/lib/alloc/ob_malloc_allocator.cpp +++ b/deps/oblib/src/lib/alloc/ob_malloc_allocator.cpp @@ -378,7 +378,7 @@ ObTenantCtxAllocator *ObMallocAllocator::take_off_tenant_allocator(uint64_t tena void ObMallocAllocator::set_root_allocator() { int ret = OB_SUCCESS; - static char buf[sizeof(ObTenantCtxAllocator) * ObCtxIds::MAX_CTX_ID]; + static char buf[sizeof(ObTenantCtxAllocator) * ObCtxIds::MAX_CTX_ID] __attribute__((__aligned__(16))); ObTenantCtxAllocator *allocator = NULL; abort_unless(OB_SUCCESS == create_tenant_allocator(OB_SERVER_TENANT_ID, buf, allocator)); abort_unless(OB_SUCCESS == add_tenant_allocator(allocator)); diff --git a/deps/oblib/src/lib/resource/ob_resource_mgr.cpp b/deps/oblib/src/lib/resource/ob_resource_mgr.cpp index bcef3e05a..58a37707a 100644 --- a/deps/oblib/src/lib/resource/ob_resource_mgr.cpp +++ b/deps/oblib/src/lib/resource/ob_resource_mgr.cpp @@ -611,7 +611,7 @@ int ObResourceMgr::create_tenant_resource_mgr_unsafe(const uint64_t tenant_id, ret = OB_INVALID_ARGUMENT; LOG_WARN("invalid argument", K(ret), K(tenant_id)); } else if (OB_UNLIKELY(OB_SERVER_TENANT_ID == tenant_id)) { - static char buf[sizeof(ObTenantResourceMgr)]; + static char buf[sizeof(ObTenantResourceMgr)] __attribute__((__aligned__(16))); ptr = buf; } else { ObMemAttr attr(OB_SERVER_TENANT_ID, "TntResourceMgr");