Add operational mode for jerry_gc API call. (#2385)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
This commit is contained in:
1 parent
bc827cb497
commit
1044523af7
8 files changed
+59
-15
No files matched your search
@@ -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 */
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user