Replace comment with assert.

This commit is contained in:
Daniel R. 2024-07-10 19:50:36 +02:00
parent e531c77fe0
commit c0f2f25555
No known key found for this signature in database
GPG Key ID: B8ADC8F57BA18DBA

View File

@ -87,8 +87,7 @@ int MemoryManager::Reserve(void** out_addr, VAddr virtual_addr, size_t size, Mem
u64 alignment) { u64 alignment) {
std::scoped_lock lk{mutex}; std::scoped_lock lk{mutex};
// TODO: Search for free space if virtual_addr is zero ASSERT_MSG(virtual_addr != 0, "TODO: Reserve address is zero - search for free space");
virtual_addr = (virtual_addr == 0) ? impl.VirtualBase() : virtual_addr;
VAddr mapped_addr = alignment > 0 ? Common::AlignUp(virtual_addr, alignment) : virtual_addr; VAddr mapped_addr = alignment > 0 ? Common::AlignUp(virtual_addr, alignment) : virtual_addr;