Add build option for changing the heap limit (#3005)
This change adds a build option that allows adjusting the garbage collection heap usage limit, which can be used to fine-tune how often garbage collection should be triggered. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
dec9dbc926
commit
3b7475b01d
@@ -120,6 +120,8 @@ def get_arguments():
|
||||
help='enable logging (%(choices)s)')
|
||||
coregrp.add_argument('--mem-heap', metavar='SIZE', type=int,
|
||||
help='size of memory heap (in kilobytes)')
|
||||
coregrp.add_argument('--gc-limit', metavar='SIZE', type=int,
|
||||
help='memory usage limit to trigger garbage collection (in bytes)')
|
||||
coregrp.add_argument('--stack-limit', metavar='SIZE', type=int,
|
||||
help='maximum stack usage (in kilobytes)')
|
||||
coregrp.add_argument('--mem-stats', metavar='X', choices=['ON', 'OFF'], type=str.upper,
|
||||
@@ -195,6 +197,7 @@ def generate_build_options(arguments):
|
||||
build_options_append('JERRY_LINE_INFO', arguments.line_info)
|
||||
build_options_append('JERRY_LOGGING', arguments.logging)
|
||||
build_options_append('JERRY_GLOBAL_HEAP_SIZE', arguments.mem_heap)
|
||||
build_options_append('JERRY_GC_LIMIT', arguments.gc_limit)
|
||||
build_options_append('JERRY_STACK_LIMIT', arguments.stack_limit)
|
||||
build_options_append('JERRY_MEM_STATS', arguments.mem_stats)
|
||||
build_options_append('JERRY_MEM_GC_BEFORE_EACH_ALLOC', arguments.mem_stress_test)
|
||||
|
||||
Reference in New Issue
Block a user