Add operational mode for jerry_gc API call. (#2385)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-06-15 09:31:48 +02:00
committed by yichoi
parent bc827cb497
commit 1044523af7
8 changed files with 59 additions and 15 deletions
+3 -2
View File
@@ -289,11 +289,12 @@ jerry_register_magic_strings (const jerry_char_ptr_t *ex_str_items_p, /**< chara
* Run garbage collection
*/
void
jerry_gc (void)
jerry_gc (jerry_gc_mode_t mode) /**< operational mode */
{
jerry_assert_api_available ();
ecma_gc_run (JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW);
ecma_gc_run (mode == JERRY_GC_SEVERITY_LOW ? JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW
: JMEM_FREE_UNUSED_MEMORY_SEVERITY_HIGH);
} /* jerry_gc */
/**