TLockFreeClassAllocator_TLSCache

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/LockFreeFixedSizeAllocator.h

Include

#include "Containers/LockFreeFixedSizeAllocator.h"

Syntax

template<class T, int TPaddingForCacheContention, bool AllowDisablingOfTrim>
class TLockFreeClassAllocator_TLSCache : private TLockFreeFixedSizeAllocator_TLSCache< sizeof(T), TPaddingForCacheContention, FNoopCounter, AllowDisablingOfTrim >

Remarks

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

Never returns free space until program shutdown.

Functions

Name Description

Public function

void *

 

Allocate()

Returns a memory block of size sizeof(T).

Public function

void

 

Free

(
    T* Item
)

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

Public function

T *

 

New()

Returns a new T using the default constructor.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss