greenplumn CMemoryPoolPallocManager 源码
greenplumn CMemoryPoolPallocManager 代码
文件路径:/src/backend/gpopt/utils/CMemoryPoolPallocManager.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2019 VMware, Inc. or its affiliates.
//
// @filename:
// CMemoryPoolPallocManager.cpp
//
// @doc:
// MemoryPoolManager implementation that creates
// CMemoryPoolPalloc memory pools
//
//---------------------------------------------------------------------------
extern "C" {
#include "postgres.h"
#include "utils/memutils.h"
}
#include "gpopt/utils/CMemoryPoolPalloc.h"
#include "gpopt/utils/CMemoryPoolPallocManager.h"
using namespace gpos;
// ctor
CMemoryPoolPallocManager::CMemoryPoolPallocManager(CMemoryPool *internal,
EMemoryPoolType)
: CMemoryPoolManager(internal, EMemoryPoolExternal)
{
}
// create new memory pool
CMemoryPool *
CMemoryPoolPallocManager::NewMemoryPool()
{
return GPOS_NEW(GetInternalMemoryPool()) CMemoryPoolPalloc();
}
void
CMemoryPoolPallocManager::DeleteImpl(void *ptr,
CMemoryPool::EAllocationType eat)
{
CMemoryPoolPalloc::DeleteImpl(ptr, eat);
}
// get user requested size of allocation
ULONG
CMemoryPoolPallocManager::UserSizeOfAlloc(const void *ptr)
{
return CMemoryPoolPalloc::UserSizeOfAlloc(ptr);
}
GPOS_RESULT
CMemoryPoolPallocManager::Init()
{
return CMemoryPoolManager::SetupGlobalMemoryPoolManager<
CMemoryPoolPallocManager, CMemoryPoolPalloc>();
}
// EOF
相关信息
相关文章
greenplumn CConstExprEvaluatorProxy 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦