Add warn message when trying to free an already freed page

This commit is contained in:
Alex 2023-03-19 23:57:17 +02:00
parent feb1af5984
commit e008796515
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -189,7 +189,10 @@ namespace Memory
} }
size_t Index = (size_t)Address / PAGE_SIZE; size_t Index = (size_t)Address / PAGE_SIZE;
if (unlikely(PageBitmap[Index] == false)) if (unlikely(PageBitmap[Index] == false))
{
warn("Tried to free an already free page. (%p)", Address);
return; return;
}
if (PageBitmap.Set(Index, false)) if (PageBitmap.Set(Index, false))
{ {