Some bugs fixed

This commit is contained in:
Nekotekina 2014-07-09 03:04:36 +04:00
parent 6e77f80d5f
commit 123c4ba1a8
7 changed files with 38 additions and 11 deletions

View file

@ -161,6 +161,8 @@ u64 DynamicMemoryBlockBase<PT>::AllocAlign(u32 size, u32 align)
addr = (addr + (align - 1)) & ~(align - 1);
}
//LOG_NOTICE(MEMORY, "AllocAlign(size=0x%x) -> 0x%llx", size, addr);
AppendMem(addr, size);
return addr;
@ -202,6 +204,8 @@ bool DynamicMemoryBlockBase<PT>::Free(u64 addr)
m_pages[i] = nullptr;
}
//LOG_NOTICE(MEMORY, "Free(0x%llx)", addr);
m_allocated.erase(m_allocated.begin() + num);
return true;
}