Fixing heap usage limit condition of starting GC.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -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