FArenaPointer

Tagged Arena Pointer

Windows
MacOS
Linux

Inheritance Hierarchy

FArenaPointer

TArenaPointer

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Memory/MemoryArena.h

Include

#include "Memory/MemoryArena.h"

Syntax

class FArenaPointer

Remarks

Tagged Arena Pointer

Stores an arena ID alongside a pointer. On 64-bit architectures the arena ID can be encoded in the otherwise unused MSB part of the pointer for zero memory overhead vs a regular pointer. For 32-bit architectures the arena ID is stored in a separate member.

A null pointer can still have an arena ID, which is useful for cases where you have a container that starts out empty but still want to track which arena should be used for subsequent allocations.

Constructors

Name Description

Public function

FArenaPointer()

Public function

FArenaPointer

(
    void* InPtr,
    uint16 InArenaTag
)

Functions

Name Description

Public function Const

FMemoryArena...

 

Arena()

Public function Const

const uint16

 

ArenaIndex()

Public function Const

void

 

Free()

Public function

void *

 

Pointer()

Public function Const

const void &...

 

Pointer()

Public function

void

 

SetPointerAndArena

(
    void* InPtr,
    uint16 InArenaTag
)

Operators

Name Description

Public function Const

 

operator bool()

Constants

Name

Description

NoTag

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