aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-13 11:06:44 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-13 11:06:44 -0800
commit1d27ea201d2298ea9b6ca16d005e9a3e81661e8e (patch)
treecc8e2a2c4c069fb6e6e3e67bfbae6c6ec5d964bb
parent3e061d95104b88d6209d892bbda24e18a1539073 (diff)
allow asm heaps to be multiples of 16MB
-rwxr-xr-xemcc9
1 files changed, 4 insertions, 5 deletions
diff --git a/emcc b/emcc
index 029d60a1..9a58094b 100755
--- a/emcc
+++ b/emcc
@@ -1143,11 +1143,10 @@ try:
heap = 4096
while heap < shared.Settings.TOTAL_MEMORY:
- heap *= 2
- #if heap <= 16*1024*1024:
- # heap *= 2
- #else:
- # heap += 16*1024*1024
+ if heap < 16*1024*1024:
+ heap *= 2
+ else:
+ heap += 16*1024*1024
if heap != shared.Settings.TOTAL_MEMORY:
logging.warning('increasing TOTAL_MEMORY to %d to be more reasonable for asm.js' % heap)
shared.Settings.TOTAL_MEMORY = heap