1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-09 21:51:45 +00:00

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 */
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);