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