void XDataAllocator::Release(const SecondaryAllocation& allocation) { const XDataAllocation& xdata = static_cast<const XDataAllocation&>(allocation); Assert(allocation.address); // Add it to free list auto freed = HeapNewNoThrowStruct(XDataAllocationEntry); if(freed) { freed->address = xdata.address; freed->next = this->freeList; this->freeList = freed; } }
void XDataAllocator::Release(const SecondaryAllocation& allocation) { const XDataAllocation& xdata = static_cast<const XDataAllocation&>(allocation); Assert(allocation.address); // Add it to free list auto freed = HeapNewNoThrowStruct(XDataAllocationEntry); if(freed) { freed->address = xdata.address; freed->next = this->freeList; this->freeList = freed; } #ifdef RECYCLER_MEMORY_VERIFY ChakraMemSet(allocation.address, Recycler::VerifyMemFill, XDATA_SIZE, this->processHandle); #endif }