Fixing heap usage limit condition of starting GC.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
This commit is contained in:
1 parent
f6b3943ffd
commit
f3983be337
1 file changed
+1
-1
@@ -641,7 +641,7 @@ mem_heap_alloc_block (size_t size_in_bytes, /**< size of region to a
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mem_heap.allocated_bytes >= mem_heap.limit)
|
if (mem_heap.allocated_bytes + size_in_bytes >= mem_heap.limit)
|
||||||
{
|
{
|
||||||
mem_run_try_to_give_memory_back_callbacks (MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_LOW);
|
mem_run_try_to_give_memory_back_callbacks (MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_LOW);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user