aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js
index a1c41de7..7e7caa6f 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -48,6 +48,13 @@ var TOTAL_MEMORY = 10*1024*1024; // The total amount of memory to use. Using mor
// we need to copy the old heap into a new one in that case.
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 ALLOW_MEMORY_GROWTH = 0; // If false, we abort with an error if we try to allocate more memory than
+ // we can (TOTAL_MEMORY). If true, we will grow the memory arrays at
+ // runtime, seamlessly and dynamically. This has a performance cost though,
+ // both during the actual growth and in general (the latter is because in
+ // that case we must be careful about optimizations, in particular the
+ // eliminator). Note that memory growth is only supported with typed
+ // arrays.
// Code embetterments
var MICRO_OPTS = 1; // Various micro-optimizations, like nativizing variables