UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FBitTree Class Reference

#include <MallocBinnedCommon.h>

Public Member Functions

 FBitTree ()
 
void FBitTreeInit (uint32 InDesiredCapacity, void *Memory, uint32 MemorySize, bool InitialValue)
 
uint32 AllocBit ()
 
bool IsAllocated (uint32 Index) const
 
void AllocBit (uint32 Index)
 
uint32 NextAllocBit () const
 
uint32 NextAllocBit (uint32 StartIndex) const
 
void FreeBit (uint32 Index)
 
uint32 CountOnes (uint32 UpTo) const
 
uint32 Slow_NextAllocBits (uint32 NumBits, uint64 StartIndex)
 

Static Public Member Functions

static constexpr uint32 GetMemoryRequirements (uint32 NumPages)
 

Constructor & Destructor Documentation

◆ FBitTree()

FBitTree::FBitTree ( )
inline

Member Function Documentation

◆ AllocBit() [1/2]

uint32 FBitTree::AllocBit ( )

◆ AllocBit() [2/2]

void FBitTree::AllocBit ( uint32  Index)

◆ CountOnes()

uint32 FBitTree::CountOnes ( uint32  UpTo) const

◆ FBitTreeInit()

void FBitTree::FBitTreeInit ( uint32  InDesiredCapacity,
void Memory,
uint32  MemorySize,
bool  InitialValue 
)

◆ FreeBit()

void FBitTree::FreeBit ( uint32  Index)

◆ GetMemoryRequirements()

static constexpr uint32 FBitTree::GetMemoryRequirements ( uint32  NumPages)
inlinestaticconstexpr

◆ IsAllocated()

bool FBitTree::IsAllocated ( uint32  Index) const

◆ NextAllocBit() [1/2]

uint32 FBitTree::NextAllocBit ( ) const

◆ NextAllocBit() [2/2]

uint32 FBitTree::NextAllocBit ( uint32  StartIndex) const

◆ Slow_NextAllocBits()

uint32 FBitTree::Slow_NextAllocBits ( uint32  NumBits,
uint64  StartIndex 
)

Finds a contiguous span of unallocated bits. NumBits must be a power of two or a multiple of 64. Only checks regions aligned to min(NumBits, 64).

Warning, slow! Requires a linear search along the bottom row! O(Capacity / min(NumBits,64)) iterations.

Returns the index of the first unallocated bit in the span.


The documentation for this class was generated from the following files: