aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-08-29 18:17:37 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-08-29 18:17:37 -0700
commit6f3e4af49c10f8a835ecb35abd6f3b6ad44827de (patch)
tree48c486ca9488a6042f2351103e677fa06d22ff39 /src/settings.js
parentf0812027a3fb3a924d2aae984cbd13e58c983320 (diff)
make FAST_MEMORY and TOTAL_MEMORY easier to use; fix slowdown in dlmalloc benchmark
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js
index 1b1665bc..ab532e67 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -34,6 +34,12 @@ INVOKE_RUN = 1; // Whether we will call run(). Disable if you embed the generate
// code in your own, and will call run() yourself at the right time
INIT_STACK = 1; // Whether to initialize memory on the stack to 0.
INIT_HEAP = 0; // Whether to initialize memory anywhere other than the stack to 0.
+FAST_MEMORY = 2*1024*1024; // The amount of memory to initialize to 0. This ensures it will be
+ // in a flat array. This only matters in non-typed array builds.
+TOTAL_MEMORY = 50*1024*1024; // The total amount of memory to use. This mainly matters in
+ // typed array builds - accessing memory about this value will
+ // return undefined values and lead to serious problems, and there
+ // is currently no warning about that!
// Code embetterments
OPTIMIZE = 0; // Optimize llvm operations into js commands