engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim > 模板类 参考

Thread safe, lock free pooling allocator of memory for instances of T. 更多...

#include <LockFreeFixedSizeAllocator.h>

+ 类 TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim > 继承关系图:

Public 成员函数

void * Allocate ()
 Returns a memory block of size sizeof(T). 更多...
 
void Free (T *Item)
 Calls a destructor on Item and returns the memory to the free list for recycling. 更多...
 
T * New ()
 Returns a new T using the default constructor. 更多...
 

详细描述

template<class T, int TPaddingForCacheContention, bool AllowDisablingOfTrim = false>
class TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim >

Thread safe, lock free pooling allocator of memory for instances of T.

Never returns free space until program shutdown.

成员函数说明

◆ Allocate()

template<class T , int TPaddingForCacheContention, bool AllowDisablingOfTrim = false>
void * TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim >::Allocate ( )
inline

Returns a memory block of size sizeof(T).

返回
Pointer to the allocated memory.
参见
Free, New

◆ Free()

template<class T , int TPaddingForCacheContention, bool AllowDisablingOfTrim = false>
void TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim >::Free ( T *  Item)
inline

Calls a destructor on Item and returns the memory to the free list for recycling.

参数
ItemThe item whose memory to free.
参见
Allocate, New

◆ New()

template<class T , int TPaddingForCacheContention, bool AllowDisablingOfTrim = false>
T * TLockFreeClassAllocator_TLSCache< T, TPaddingForCacheContention, AllowDisablingOfTrim >::New ( )
inline

Returns a new T using the default constructor.

返回
Pointer to the new object.
参见
Allocate, Free

该类的文档由以下文件生成: