Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Make couchjs -S option take effect
Previously it was used to set JS context's stack chunk size.

Instead, to be effective it should set max GC size of the runtime.

Stack chunk size was set to the recommended value: 8K

This brings back an accidentally reverted commit:

62dafe8

by @tilgovi

Reference:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_NewContext

COUCHDB-3245
  • Loading branch information
nickva committed Nov 30, 2016
1 parent 54890e1 commit 1659fda5dd1808f55946a637fc26c73913b57e96
Showing 1 changed file with 2 additions and 2 deletions.
@@ -387,11 +387,11 @@ main(int argc, const char* argv[])

couch_args* args = couch_parse_args(argc, argv);

rt = JS_NewRuntime(64L * 1024L * 1024L);
rt = JS_NewRuntime(args->stack_size);
if(rt == NULL)
return 1;

cx = JS_NewContext(rt, args->stack_size);
cx = JS_NewContext(rt, 8L * 1024L);
if(cx == NULL)
return 1;

0 comments on commit 1659fda

Please sign in to comment.