couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rand...@apache.org
Subject git commit: updated refs/heads/master to 501459c
Date Wed, 15 May 2013 22:17:34 GMT
Updated Branches:
  refs/heads/master a71fc206d -> 501459c8b


[couchjs] make stack size option effective

The previous way this was coded changes the chunk size that is used
whenever the stack grows but does not change the maximum memory
allowed by the runtime.

Closes COUCHDB-1792


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/501459c8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/501459c8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/501459c8

Branch: refs/heads/master
Commit: 501459c8b70efb814f5eef131201f7954781af1d
Parents: a71fc20
Author: Randall Leeds <randall@apache.org>
Authored: Tue May 14 17:34:40 2013 -0700
Committer: Randall Leeds <randall@apache.org>
Committed: Wed May 15 15:16:39 2013 -0700

----------------------------------------------------------------------
 src/couchdb/priv/couch_js/help.h  |    4 ++--
 src/couchdb/priv/couch_js/sm170.c |    6 +++---
 src/couchdb/priv/couch_js/sm180.c |    6 +++---
 src/couchdb/priv/couch_js/sm185.c |    4 ++--
 src/couchdb/priv/couch_js/util.c  |    2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/501459c8/src/couchdb/priv/couch_js/help.h
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/couch_js/help.h b/src/couchdb/priv/couch_js/help.h
index b31bb8c..f4ddb24 100644
--- a/src/couchdb/priv/couch_js/help.h
+++ b/src/couchdb/priv/couch_js/help.h
@@ -48,8 +48,8 @@ static const char USAGE_TEMPLATE[] =
     "  -V          display version information and exit\n"
     "  -H          enable %s cURL bindings (only avaiable\n"
     "              if package was built with cURL available)\n"
-    "  -S SIZE     specify that the interpreter should set the\n"
-    "              stack quota for JS contexts to SIZE bytes\n"
+    "  -S SIZE     specify that the runtime should allow at\n"
+    "              most SIZE bytes of memory to be allocated\n"
     "  -u FILE     path to a .uri file containing the address\n"
     "              (or addresses) of one or more servers\n"
     "\n"

http://git-wip-us.apache.org/repos/asf/couchdb/blob/501459c8/src/couchdb/priv/couch_js/sm170.c
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/couch_js/sm170.c b/src/couchdb/priv/couch_js/sm170.c
index 4a18d8f..51e4f4d 100644
--- a/src/couchdb/priv/couch_js/sm170.c
+++ b/src/couchdb/priv/couch_js/sm170.c
@@ -313,12 +313,12 @@ main(int argc, const char* argv[])
     int i;
 
     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;
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/501459c8/src/couchdb/priv/couch_js/sm180.c
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/couch_js/sm180.c b/src/couchdb/priv/couch_js/sm180.c
index 9ffd1df..5fb8ce0 100644
--- a/src/couchdb/priv/couch_js/sm180.c
+++ b/src/couchdb/priv/couch_js/sm180.c
@@ -322,12 +322,12 @@ main(int argc, const char* argv[])
     int i;
 
     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;
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/501459c8/src/couchdb/priv/couch_js/sm185.c
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/couch_js/sm185.c b/src/couchdb/priv/couch_js/sm185.c
index bfee023..c378d4a 100644
--- a/src/couchdb/priv/couch_js/sm185.c
+++ b/src/couchdb/priv/couch_js/sm185.c
@@ -335,11 +335,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;
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/501459c8/src/couchdb/priv/couch_js/util.c
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/couch_js/util.c b/src/couchdb/priv/couch_js/util.c
index 5c88402..b4700de 100644
--- a/src/couchdb/priv/couch_js/util.c
+++ b/src/couchdb/priv/couch_js/util.c
@@ -77,7 +77,7 @@ couch_parse_args(int argc, const char* argv[])
         return NULL;
 
     memset(args, '\0', sizeof(couch_args));
-    args->stack_size = 8L * 1024L;
+    args->stack_size = 64L * 1024L * 1024L;
 
     while(i < argc) {
         if(strcmp("-h", argv[i]) == 0) {


Mime
View raw message