lmem: fix memory block header placement error

This commit is contained in:
Michael Scire 2020-03-30 00:56:57 -07:00
parent bd4c608b08
commit 058f265bd6

View file

@ -284,7 +284,7 @@ namespace ams::lmem::impl {
{ {
/* Create the used block */ /* Create the used block */
MemoryRegion used_region{ .start = free_region_front.end, .end = free_region_back.start }; MemoryRegion used_region{ .start = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(block) - sizeof(ExpHeapMemoryBlockHead)), .end = free_region_back.start };
ExpHeapMemoryBlockHead *used_block = InitializeUsedMemoryBlock(used_region); ExpHeapMemoryBlockHead *used_block = InitializeUsedMemoryBlock(used_region);