correct the owner tenant of Compressor memory
This commit is contained in:
@ -41,8 +41,9 @@ static void ob_zstd_free(void *opaque, void *address)
|
|||||||
/**
|
/**
|
||||||
* ------------------------------ObZstdCtxAllocator---------------------
|
* ------------------------------ObZstdCtxAllocator---------------------
|
||||||
*/
|
*/
|
||||||
ObZstdCtxAllocator::ObZstdCtxAllocator()
|
ObZstdCtxAllocator::ObZstdCtxAllocator(int64_t tenant_id)
|
||||||
: allocator_(ObModIds::OB_COMPRESSOR, OB_MALLOC_BIG_BLOCK_SIZE)
|
: allocator_(ObModIds::OB_COMPRESSOR, OB_MALLOC_BIG_BLOCK_SIZE,
|
||||||
|
tenant_id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,11 +26,11 @@ namespace zstd
|
|||||||
class ObZstdCtxAllocator
|
class ObZstdCtxAllocator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObZstdCtxAllocator();
|
ObZstdCtxAllocator(int64_t tenant_id);
|
||||||
virtual ~ObZstdCtxAllocator();
|
virtual ~ObZstdCtxAllocator();
|
||||||
static ObZstdCtxAllocator &get_thread_local_instance()
|
static ObZstdCtxAllocator &get_thread_local_instance()
|
||||||
{
|
{
|
||||||
thread_local ObZstdCtxAllocator allocator;
|
thread_local ObZstdCtxAllocator allocator(ob_thread_tenant_id());
|
||||||
return allocator;
|
return allocator;
|
||||||
}
|
}
|
||||||
void *alloc(size_t size);
|
void *alloc(size_t size);
|
||||||
|
|||||||
@ -42,8 +42,9 @@ static void ob_zstd_free(void *opaque, void *address)
|
|||||||
/**
|
/**
|
||||||
* ------------------------------ObZstdCtxAllocator---------------------
|
* ------------------------------ObZstdCtxAllocator---------------------
|
||||||
*/
|
*/
|
||||||
ObZstdCtxAllocator::ObZstdCtxAllocator()
|
ObZstdCtxAllocator::ObZstdCtxAllocator(int64_t tenant_id)
|
||||||
: allocator_(ObModIds::OB_COMPRESSOR, OB_MALLOC_BIG_BLOCK_SIZE)
|
: allocator_(ObModIds::OB_COMPRESSOR, OB_MALLOC_BIG_BLOCK_SIZE,
|
||||||
|
tenant_id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,11 +26,11 @@ namespace zstd_1_3_8
|
|||||||
class ObZstdCtxAllocator
|
class ObZstdCtxAllocator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObZstdCtxAllocator();
|
ObZstdCtxAllocator(int64_t tenant_id);
|
||||||
virtual ~ObZstdCtxAllocator();
|
virtual ~ObZstdCtxAllocator();
|
||||||
static ObZstdCtxAllocator &get_thread_local_instance()
|
static ObZstdCtxAllocator &get_thread_local_instance()
|
||||||
{
|
{
|
||||||
thread_local ObZstdCtxAllocator allocator;
|
thread_local ObZstdCtxAllocator allocator(ob_thread_tenant_id());
|
||||||
return allocator;
|
return allocator;
|
||||||
}
|
}
|
||||||
void *alloc(size_t size);
|
void *alloc(size_t size);
|
||||||
|
|||||||
Reference in New Issue
Block a user