aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-06 13:27:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-06 13:27:43 -0800
commitbea3d23dc5316222d31127299ea1896223075ac4 (patch)
treef7eaa5442d162cd3ca2575e6a46c06a0fd7a309c /src/settings.js
parent0f3f5cc6934a45c78ce7bfb2bdab15bb8756edf7 (diff)
initial work on memory growth
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/settings.js b/src/settings.js
index 0964d4bb..4dc94f4a 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -33,10 +33,9 @@ var INIT_STACK = 1; // Whether to initialize memory on the stack to 0.
var INIT_HEAP = 0; // Whether to initialize memory anywhere other than the stack to 0.
var 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.
-var 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!
+var TOTAL_MEMORY = 50*1024*1024; // The total amount of memory to use. Using more memory than this will
+ // cause us to expand the heap, which can be costly with typed arrays:
+ // we need to copy the old heap into a new one in that case.
// Code embetterments
var MICRO_OPTS = 0; // Various micro-optimizations, like nativizing variables