/// <summary> /// Gets the size of this memory allocation from the next header; where the size of /// this allocation should be stored. /// </summary> /// <param name="thisPtr">Pointer to the next item.</param> public int GetSizeFromNextHeader(MemoryHeapHeaderHigh *thisPtr) { if (NextItem == (void *)0) { return(0); } return(NextItem->BufferSize); }
/// <summary> /// Gets the size of this memory allocation by calculating offset between next header /// and this header; provided the next item ptr is not null. /// </summary> /// <param name="thisPtr">Pointer to the next item.</param> public int GetSize(MemoryHeapHeaderHigh *thisPtr) { if (NextItem == (void *)0) { return(0); } return((int)((uint)thisPtr - (uint)NextItem)); }