Simplify severity mechanism in mem allocator.

Related issue: #63

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2015-10-28 12:54:50 +01:00
parent 8af87206c9
commit eaca37c4c9
6 changed files with 9 additions and 24 deletions
+1 -6
View File
@@ -580,14 +580,9 @@ ecma_try_to_give_back_some_memory (mem_try_give_memory_back_severity_t severity)
ecma_gc_run ();
}
}
else if (severity == MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_MEDIUM
|| severity == MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_HIGH)
{
ecma_gc_run ();
}
else
{
JERRY_ASSERT (severity == MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_CRITICAL);
JERRY_ASSERT (severity == MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_HIGH);
/* Freeing as much memory as we currently can */
ecma_lcache_invalidate_all ();