1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-13 23:46:40 +00:00

lmem: fix assert with side effects

This commit is contained in:
Michael Scire 2021-09-29 23:56:30 -07:00
parent 427ab78bc6
commit c31060f0b8

View file

@ -462,7 +462,11 @@ namespace ams::lmem::impl {
/* Erase the heap from the used list, and coalesce it with adjacent blocks. */ /* Erase the heap from the used list, and coalesce it with adjacent blocks. */
GetMemoryBlockRegion(&region, block); GetMemoryBlockRegion(&region, block);
exp_heap_head->used_list.erase(exp_heap_head->used_list.iterator_to(*block)); exp_heap_head->used_list.erase(exp_heap_head->used_list.iterator_to(*block));
AMS_ASSERT(CoalesceFreedRegion(exp_heap_head, &region));
/* Coalesce with adjacent blocks. */
const bool coalesced = CoalesceFreedRegion(exp_heap_head, &region);
AMS_ASSERT(coalesced);
AMS_UNUSED(coalesced);
} }
size_t ResizeExpHeapMemoryBlock(HeapHandle handle, void *mem_block, size_t size) { size_t ResizeExpHeapMemoryBlock(HeapHandle handle, void *mem_block, size_t size) {