19 static_assert(
sizeof(
Block) == 0x10);
44 std::size_t
Size(
void const* a_mem)
const override {
return *
static_cast<const std::size_t*
>(a_mem) & ~(std::size_t{ 3 } << 62); }
50 void*
Allocate(std::size_t a_size, std::size_t a_alignment);
69 static_assert(
sizeof(ScrapHeap) == 0x90);
Definition: IMemoryStore.h:8
Definition: ScrapHeap.h:8
~ScrapHeap() override
Definition: ScrapHeap.h:41
std::size_t Size(void const *a_mem) const override
Definition: ScrapHeap.h:44
void Deallocate(void *a_mem)
bool ContainsBlockImpl(const void *a_block) const override
Definition: ScrapHeap.h:46
std::uint32_t pmpBarrier
Definition: ScrapHeap.h:67
std::size_t reserveSize
Definition: ScrapHeap.h:60
void * AllocateAlignImpl(std::size_t a_size, std::uint32_t a_alignment) override
Definition: ScrapHeap.h:47
std::uint32_t freeSmallBlocks
Definition: ScrapHeap.h:65
Block * lastBlock
Definition: ScrapHeap.h:56
std::uint32_t keepPagesRequest
Definition: ScrapHeap.h:63
static constexpr auto RTTI
Definition: ScrapHeap.h:10
std::size_t totalAllocated
Definition: ScrapHeap.h:62
FreeTreeNode * freeList
Definition: ScrapHeap.h:55
std::uint32_t totalAllocatedBlocks
Definition: ScrapHeap.h:66
std::uint32_t totalFreeBlocks
Definition: ScrapHeap.h:64
void * baseAddress
Definition: ScrapHeap.h:57
std::size_t minCommit
Definition: ScrapHeap.h:61
void * commitEnd
Definition: ScrapHeap.h:59
void GetMemoryStats(MemoryStats *) override
Definition: ScrapHeap.h:45
void * endAddress
Definition: ScrapHeap.h:58
FreeBlock * smallBlocks[6]
Definition: ScrapHeap.h:54
void * Allocate(std::size_t a_size, std::size_t a_alignment)
void DeallocateAlignImpl(void *&a_block) override
Definition: ScrapHeap.h:48
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_ScrapHeap
Definition: Offsets_RTTI.h:5794
constexpr auto MEM_RELEASE
Definition: WinAPI.h:10
bool VirtualFree(void *a_address, std::size_t a_size, std::uint32_t a_freeType) noexcept
Definition: IMemoryStoreBase.h:6
Definition: ScrapHeap.h:13
Block * prev
Definition: ScrapHeap.h:17
std::size_t sizeFlags
Definition: ScrapHeap.h:16
Definition: ScrapHeap.h:22
FreeBlock * right
Definition: ScrapHeap.h:26
FreeBlock * left
Definition: ScrapHeap.h:25
Definition: ScrapHeap.h:31
FreeTreeNode * leftNode
Definition: ScrapHeap.h:35
std::size_t parentAndBlack
Definition: ScrapHeap.h:37
FreeTreeNode * rightNode
Definition: ScrapHeap.h:36
FreeTreeNode ** root
Definition: ScrapHeap.h:34