Add getter for GC threshold
This commit is contained in:
parent
d3da56b630
commit
ed8f73413c
2 changed files with 5 additions and 0 deletions
|
@ -1767,6 +1767,10 @@ void JS_SetDumpFlags(JSRuntime *rt, uint64_t flags)
|
||||||
rt->dump_flags = flags;
|
rt->dump_flags = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t JS_GetGCThreshold(JSRuntime *rt) {
|
||||||
|
return rt->malloc_gc_threshold;
|
||||||
|
}
|
||||||
|
|
||||||
/* use -1 to disable automatic GC */
|
/* use -1 to disable automatic GC */
|
||||||
void JS_SetGCThreshold(JSRuntime *rt, size_t gc_threshold)
|
void JS_SetGCThreshold(JSRuntime *rt, size_t gc_threshold)
|
||||||
{
|
{
|
||||||
|
|
|
@ -305,6 +305,7 @@ JS_EXTERN void JS_SetRuntimeInfo(JSRuntime *rt, const char *info);
|
||||||
/* use 0 to disable memory limit */
|
/* use 0 to disable memory limit */
|
||||||
JS_EXTERN void JS_SetMemoryLimit(JSRuntime *rt, size_t limit);
|
JS_EXTERN void JS_SetMemoryLimit(JSRuntime *rt, size_t limit);
|
||||||
JS_EXTERN void JS_SetDumpFlags(JSRuntime *rt, uint64_t flags);
|
JS_EXTERN void JS_SetDumpFlags(JSRuntime *rt, uint64_t flags);
|
||||||
|
JS_EXTERN size_t JS_GetGCThreshold(JSRuntime *rt);
|
||||||
JS_EXTERN void JS_SetGCThreshold(JSRuntime *rt, size_t gc_threshold);
|
JS_EXTERN void JS_SetGCThreshold(JSRuntime *rt, size_t gc_threshold);
|
||||||
/* use 0 to disable maximum stack size check */
|
/* use 0 to disable maximum stack size check */
|
||||||
JS_EXTERN void JS_SetMaxStackSize(JSRuntime *rt, size_t stack_size);
|
JS_EXTERN void JS_SetMaxStackSize(JSRuntime *rt, size_t stack_size);
|
||||||
|
|
Loading…
Reference in a new issue