set TOTAL_MEMORY to default to powers of two, for now

This commit is contained in:
Alon Zakai 2013-11-13 14:31:47 -08:00
Родитель 51f6b5b056
Коммит 987ce9f2c0
1 изменённых файлов: 5 добавлений и 4 удалений

9
emcc
Просмотреть файл

@ -1133,10 +1133,11 @@ try:
heap = 4096
while heap < shared.Settings.TOTAL_MEMORY:
if heap <= 16*1024*1024:
heap *= 2
else:
heap += 16*1024*1024
heap *= 2
#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