aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/settings.js b/src/settings.js
index a6c11448..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
@@ -213,10 +220,9 @@ var SHOW_LABELS = 0; // Show labels in the generated code
var PRINT_SPLIT_FILE_MARKER = 0; // Prints markers in Javascript generation to split the file later on. See emcc --split option.
-var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library, which
- // must be loaded dynamically using dlopen().
+var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library
// 0 here means this is not a shared lib: It is a main file.
- // 1 means this is a normal shared lib.
+ // 1 means this is a normal shared lib, load it with dlopen().
// 2 means this is a shared lib that will be linked at runtime,
// which means it will insert its functions into
// the global namespace. See STATIC_LIBS_TO_LOAD.
@@ -225,6 +231,8 @@ var RUNTIME_LINKED_LIBS = []; // If this is a main file (BUILD_AS_SHARED_LIB ==
// BUILD_AS_SHARED_LIB == 2.
// NOTE: LLVM optimizations run separately on the main file and
// linked libraries can break things.
+var BUILD_AS_WORKER = 0; // If set to 1, this is a worker library, a special kind of library
+ // that is run in a worker. See emscripten.h
var LINKABLE = 0; // If set to 1, this file can be linked with others, either as a shared
// library or as the main file that calls a shared library. To enable that,
// we will not internalize all symbols and cull the unused ones, in other