A dynamic heap for allocating and tracking unmanaged objects. More...
Classes | |
class | Ignore |
Ignore this field when scanning for pointers. More... | |
Public Types | |
enum class | ObjectFlags : byte |
Public Member Functions | |
delegate void | CollectGarbageDelegate (DynamicHeap *heap, void **dynamicRoots, int dynamicRootsLength) |
Collect garbage delegate More... | |
Static Public Member Functions | |
static void | AllocateBlock (DynamicHeap *heap) |
static byte * | AllocateInternal (DynamicHeap *heap, int size, out byte block) |
static Page * | AllocatePage (DynamicHeap *heap) |
static Page * | AllocatePage_Internal (DynamicHeap *heap, bool mustSucceed) |
static int | BitScan (uint v) |
static int | BlocksWithAvailablePages (DynamicHeap *heap) |
static void | CollectGarbage (DynamicHeap *heap, void **dynamicRoots, int dynamicRootsLength) |
Collect garbage More... | |
static void | Destroy (Block *block) |
static void | ExpandStack (DynamicHeap *heap) |
static void | Free (DynamicHeap *heap, void *ptr) |
Free up an object More... | |
static void | FreeInternal (DynamicHeap *heap, void *ptr, Object objData) |
static int | GetBin (int size) |
static Bin * | GetBinByIndex (DynamicHeap *heap, int binIndex) |
static int | GetBinIndexForSize (DynamicHeap *heap, int size) |
static Page * | GetPageForPtr (DynamicHeap *heap, Block *block, void *ptr) |
static int | GetPageOffset (Page *page, ObjectFree *obj) |
static ushort | GetTypeOffset< T > () |
static void | InitObj (DynamicHeap *heap, Object *obj, ushort type, ushort array, byte block) |
static void | InitRoot (DynamicHeap *heap, Object *obj) |
static bool | IsPtrInBlock (DynamicHeap *heap, Block *block, void *p) |
static ushort | NextGen (DynamicHeap *heap) |
static int | ObjectsFreeCount (Page *p) |
static int | PagesWithAvailableObjectsInBin (Bin *bin) |
static ObjectFree * | ResolvePageOffset (Page *page, int offset) |
static T * | SetForcedAlive< T > (T *ptr) |
Mark an object with ObjectFlags.ForceAlive More... | |
static void | ThrowHeapCorrupted () |
static byte * | TryAllocateFromPage (DynamicHeap *heap, Page *page, int size, out byte block) |
static int | WordCount (int size) |
Static Public Attributes | |
static byte[] | _debruijnTable |
static Dictionary< Type, TypeData > | _types = null |
static Dictionary< ushort, TypeData > | _typesByOffset = null |
A dynamic heap for allocating and tracking unmanaged objects.
|
static |
Collect garbage
heap | Dynamic heap to collect from |
dynamicRoots | Dynamic roots |
dynamicRootsLength | Dynamic roots length |
delegate void CollectGarbageDelegate | ( | DynamicHeap * | heap, |
void ** | dynamicRoots, | ||
int | dynamicRootsLength | ||
) |
Collect garbage delegate
|
static |
Free up an object
heap | Heap to free from |
ptr | Pointer to object |
InvalidOperationException | Thrown if ptr is not a tracked object |
|
static |
Mark an object with ObjectFlags.ForceAlive
ptr | Pointer Object to mark |
T | Type of object |
T | : | unmanaged |
|
static |