Nebula
Loading...
Searching...
No Matches
rangeallocator.h File Reference

Detailed Description

#include "core/types.h"
#include "util/bit.h"
#include "util/array.h"
#include <utility>

Go to the source code of this file.

Classes

struct  Memory::RangeAllocation
 Describes a range allocated by the Memory::RangeAllocator. More...
class  Memory::RangeAllocator
 Allocates memory ranges using the TLSF method, with extended handling of padding to better suit GPUs. More...
struct  Memory::RangeAllocator::RangeAllocatorNode
struct  Memory::RangeAllocator::BinIndex

Namespaces

namespace  Memory

Functions

uint Memory::FindLowestSetBitAfter (uint bitMask, uint startBitIndex)
uint Memory::BinMaskRoundedUp (size_t size)
 Calculate bin mask using 16 bit float distribution and round up to nearest upper bin.
uint Memory::BinMask (size_t size)
 Calculate bin mask using 16 bit float distribution.

Variables

static constexpr uint Memory::BUCKET_INDEX_SHIFT = 3u
static constexpr uint Memory::BIN_INDEX_MASK = 0x7
static constexpr uint Memory::MANTISSA_BITS = 3
static constexpr uint Memory::MANTISSA_VALUE = 1 << MANTISSA_BITS
static constexpr uint Memory::MANTISSA_MASK = MANTISSA_VALUE - 1