Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enlarge memory arrays #9

Closed
Kontsedal opened this issue Apr 15, 2016 · 4 comments
Closed

Cannot enlarge memory arrays #9

Kontsedal opened this issue Apr 15, 2016 · 4 comments

Comments

@Kontsedal
Copy link

I have some error, how to avoid it?

abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 67108864, (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adj
usts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of t
his abort, compile with  -s ABORTING_MALLOC=0 ")
@Kagami
Copy link
Owner

Kagami commented Apr 15, 2016

Try to pass TOTAL_MEMORY: 128 * 1024 * 1024 (128MB) option. There is 64MB by default which might be not enough for some files.

@Kontsedal
Copy link
Author

@Kagami this have helped , thanks for fast feedback)

@artokun
Copy link

artokun commented Apr 24, 2017

32MB = 33554432 = 2^25 to compute n frames up to = 2^14 = 16384
64MB = 67108864 = 2^26 to compute n frames up to = 2^15 = 32768
128MB = 134217728 = 2^27 to compute n frames up to = 2^16 = 65536
256MB = 268435456 = 2^28 to compute n frames up to = 2^17 = 131072
512MB = 536870912 = 2^29 to compute n frames up to = 2^18 = 262144
1GB = 1073741824 = 2^30 to compute n frames up to = 2^19 = 524288

@cosmopolit
Copy link

Just a little hint to change the TOTAL_MEMORY fast: Open the compiled .js file in a notepad and replace all string values for 67108864 with the memory you need :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants