This commit is contained in:
Eladash 2019-06-22 12:10:47 +03:00 committed by Ivan
parent cd0ef99df5
commit 806a7bbf04
1 changed files with 1 additions and 1 deletions

View File

@ -717,7 +717,7 @@ namespace vm
shm = std::make_shared<utils::shm>(size); shm = std::make_shared<utils::shm>(size);
// Search for an appropriate place (unoptimized) // Search for an appropriate place (unoptimized)
for (u32 addr = ::align(this->addr, align); u64{addr} + size < u64{this->addr} + this->size - 1; addr += align) for (u32 addr = ::align(this->addr, align); u64{addr} + size <= u64{this->addr} + this->size; addr += align)
{ {
if (try_alloc(addr, pflags, size, std::move(shm))) if (try_alloc(addr, pflags, size, std::move(shm)))
{ {