diff options
author | alon@honor <none@none> | 2010-10-04 23:11:41 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-04 23:11:41 -0700 |
commit | 01ae695b4db1b8d01c291871384be5a8df44499b (patch) | |
tree | 9a5012bca8f0ce9f997fb3898c27011ecafacd59 /src | |
parent | af8eec1c682af409928f28e3a4176115d1c0870f (diff) |
higher memory defaults, for raytracing demo
Diffstat (limited to 'src')
-rw-r--r-- | src/preamble.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/preamble.js b/src/preamble.js index 08edb022..4f7fef93 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -37,8 +37,10 @@ START_TIME = Date.now(); function assert(condition, text) { if (!condition) { - print('Assertion failed: ' + text + ':\n' + (new Error).stack); - throw "Assertion"; + var text = "Assertion failed: " + text; + print(text + ':\n' + (new Error).stack); + if (this[alert]) alert(text) + throw "Assertion: " + text; } } @@ -145,10 +147,10 @@ function __initializeRuntime__() { HEAP = intArrayFromString('(null)'); // So printing %s of NULL gives '(null)' // Also this ensures we leave 0 as an invalid address, 'NULL' - if (!this['TOTAL_STATIC']) TOTAL_STATIC = 64*1024; // Reserved room for static allocation + if (!this['TOTAL_STATIC']) TOTAL_STATIC = 64*1024*100; // Reserved room for static allocation STATICROOT = STATICTOP = alignMemoryPage(HEAP.length); - if (!this['TOTAL_STACK']) TOTAL_STACK = 64*1024; // Reserved room for stack + if (!this['TOTAL_STACK']) TOTAL_STACK = 64*1024*10; // Reserved room for stack STACK_STACK = []; STACKROOT = STACKTOP = alignMemoryPage(STATICROOT + TOTAL_STATIC); |