コード例 #1
0
ファイル: VeSystem.cpp プロジェクト: xxponline/Venus3D
//--------------------------------------------------------------------------
const VePoolAllocatorPtr& VeSystem::GetPoolAllocator(
	VeSizeT stUnitSize) noexcept
{
	stUnitSize = (stUnitSize + 0xF) & (~0xF);
	VePoolAllocatorPtr& spRes = m_kAllocatorMap[stUnitSize];
	if (!spRes)
	{
		spRes = VE_NEW VePoolAllocator(stUnitSize);
	}
	return spRes;
}
コード例 #2
0
//--------------------------------------------------------------------------
const VePoolAllocatorPtr& VeAllocatorManager::GetPoolAllocator(
	VeUInt32 u32Size)
{
	VePoolAllocatorPtr* pkIter = m_kPoolAllocatorMap.Find(u32Size);
	if(pkIter)
	{
		return *pkIter;
	}
	else
	{
		return m_kPoolAllocatorMap[u32Size] =
			VE_NEW VePoolAllocator(u32Size, 32);
	}
}