UserHeap: allocate needed memory in request_virtual_pages

This commit is contained in:
apio 2022-10-17 18:52:11 +02:00
parent 92634048fc
commit 34fc6996b0

View File

@ -2,6 +2,7 @@
#include "memory/UserHeap.h"
#include "log/Log.h"
#include "misc/utils.h"
#include "std/stdlib.h"
#include "std/string.h"
@ -137,7 +138,7 @@ allocate:
}
}
if (attempts < 5 && try_expand())
if (attempts == 0 && try_expand_size(Utilities::get_blocks_from_size(8, count) + 256))
{
attempts++;
goto allocate;