Photon Fusion 2.0.3

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Allocator Struct Reference

Memory Allocator More...

Classes

struct  Config
 Memory Allocator Configuration More...
 

Public Member Functions

Block * GetBlock (int index)
 
Block * GetBlock (long index)
 
int GetBlockBucket (long index)
 
Block * GetBlockForPointer (void *ptr)
 
int GetBlockIndexForPointer (void *ptr)
 
byte * GetBlockMemory (Block *block)
 
byte * GetBlockMemory (long blockIndex)
 
Bucket * GetBucket (int index)
 
Bucket * GetBucketForBlock (Block *block)
 
BlockList * GetBucketList (int index)
 
bool IsPointerInMeta (void *p)
 
void * Meta (Ptr ptr)
 
Ptr Meta (void *p)
 

Static Public Member Functions

static void DebugVerifyBucketIntegrity (Allocator *a, int index)
 
static void * TryAllocateSegmentFromBlock (Allocator *a, Bucket *bucket, Block *block, int size)
 
static int WordCount (int size)
 

Public Attributes

Block * _blocks
 
BlockList * _blocksFreeList
 
Bucket * _buckets
 
BlockList * _bucketsLists
 
byte * _bucketsMap
 
void * _checksum
 
int _checksumByteLength
 
Config _config
 
void * _globals
 
byte * _heap
 
int _maxBlockIndexUsed
 
byte * _meta
 
void * _replicate
 
int _replicateByteLength
 
byte * _root
 

Static Public Attributes

const int BUCKET_COUNT = 57
 Bucket Count More...
 
const byte BUCKET_INVALID = 255
 Bucket Invalid More...
 
const int HEAP_ALIGNMENT = 8
 Heap Alignment More...
 
const int PTR_SIZE = 8
 
const int REPLICATE_WORD_ALIGN = REPLICATE_WORD_SIZE
 Replicate Word Align More...
 
const int REPLICATE_WORD_SHIFT = 2
 Replicate Word Shift More...
 
const int REPLICATE_WORD_SIZE = 1 << REPLICATE_WORD_SHIFT
 Replicate Word Size More...
 
const int SIZE = 112
 
const int WORD_BYTE_SIZE = 1 << 3
 
const int WORD_SHIFT = 3
 

Detailed Description

Memory Allocator

Member Data Documentation

◆ BUCKET_COUNT

const int BUCKET_COUNT = 57
static

Bucket Count

◆ BUCKET_INVALID

const byte BUCKET_INVALID = 255
static

Bucket Invalid

◆ HEAP_ALIGNMENT

const int HEAP_ALIGNMENT = 8
static

Heap Alignment

◆ REPLICATE_WORD_ALIGN

const int REPLICATE_WORD_ALIGN = REPLICATE_WORD_SIZE
static

Replicate Word Align

◆ REPLICATE_WORD_SHIFT

const int REPLICATE_WORD_SHIFT = 2
static

Replicate Word Shift

◆ REPLICATE_WORD_SIZE

const int REPLICATE_WORD_SIZE = 1 << REPLICATE_WORD_SHIFT
static

Replicate Word Size