Introduce GC stress testing mode (-mem_stress_test prefix; for example: debug.linux-mem_stress_test).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -24,14 +24,15 @@
|
||||
* Memory pool manager implementation
|
||||
*/
|
||||
|
||||
#define JERRY_MEM_POOL_INTERNAL
|
||||
|
||||
#include "jrt.h"
|
||||
#include "jrt-libc-includes.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "mem-heap.h"
|
||||
#include "mem-poolman.h"
|
||||
|
||||
#define MEM_ALLOCATOR_INTERNAL
|
||||
#include "mem-allocator-internal.h"
|
||||
|
||||
/**
|
||||
* Size of a pool
|
||||
*/
|
||||
@@ -521,6 +522,10 @@ mem_pools_alloc_longpath (void)
|
||||
uint8_t* __attr_always_inline___
|
||||
mem_pools_alloc (void)
|
||||
{
|
||||
#ifdef MEM_GC_BEFORE_EACH_ALLOC
|
||||
mem_run_try_to_give_memory_back_callbacks (MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_CRITICAL);
|
||||
#endif /* MEM_GC_BEFORE_EACH_ALLOC */
|
||||
|
||||
mem_check_pools ();
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user