diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-29 13:00:32 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-29 13:00:32 -0700 |
commit | b30283324ee657a14115b4df6620717b2b32a12c (patch) | |
tree | f12415134dd37c6b86599e2e8974ebc939083398 | |
parent | c0605af62786e2f733ea67acf218f26eace1c4ba (diff) |
adjust memory size in tests
-rw-r--r-- | src/preamble.js | 2 | ||||
-rwxr-xr-x | tests/runner.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js index 24277014..9ee90728 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -577,7 +577,7 @@ var STATICTOP; #if USE_TYPED_ARRAYS function enlargeMemory() { #if ALLOW_MEMORY_GROWTH == 0 - abort('Cannot enlarge memory arrays. Adjust TOTAL_MEMORY or compile with ALLOW_MEMORY_GROWTH'); + abort('Cannot enlarge memory arrays. Adjust TOTAL_MEMORY (currently ' + TOTAL_MEMORY + ') or compile with ALLOW_MEMORY_GROWTH'); #else // TOTAL_MEMORY is the current size of the actual array, and STATICTOP is the new top. #if ASSERTIONS diff --git a/tests/runner.py b/tests/runner.py index 87af056a..68709cc3 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -2783,7 +2783,7 @@ def process(filename): ''' # Fail without memory growth - self.do_run(src, 'Cannot enlarge memory arrays. Adjust TOTAL_MEMORY or compile with ALLOW_MEMORY_GROWTH') + self.do_run(src, 'Cannot enlarge memory arrays. Adjust TOTAL_MEMORY (currently 10485760) or compile with ALLOW_MEMORY_GROWTH') fail = open('src.cpp.o.js').read() # Win with it @@ -5430,7 +5430,7 @@ int main(int argc, char **argv) { # emcc should build in dlmalloc automatically, and do all the sign correction etc. for it try_delete(os.path.join(self.get_dir(), 'src.cpp.o.js')) - output = Popen(['python', EMCC, path_from_root('tests', 'dlmalloc_test.c'), + output = Popen(['python', EMCC, path_from_root('tests', 'dlmalloc_test.c'), '-s', 'TOTAL_MEMORY=100000000', '-o', os.path.join(self.get_dir(), 'src.cpp.o.js')], stdout=PIPE, stderr=self.stderr_redirect).communicate() self.do_run('x', '*1,0*', ['200', '1'], no_build=True) @@ -5584,6 +5584,8 @@ void*:16 self.do_run(src, '*10,22*') def test_mmap(self): + Settings.TOTAL_MEMORY = 100*1024*1024 + src = ''' #include <stdio.h> #include <sys/mman.h> |