Closed
Description
When running
help('modules')
it causes Python to OOM (the heap is limited to 16MB). We should consider using either
-s INITIAL_MEMORY=X
for something like 20-30MB or- just allow memory growth via
-s ALLOW_MEMORY_GROWTH=1
.
We should maybe also compile with -s ABORTING_MALLOC=0
which makes malloc()
return NULL, which will give people a more familiar Python traceback rather than the following:
Uncaught RuntimeError: Aborted(Cannot enlarge memory arrays to size 16855040 bytes (OOM). Either (1) compile with -s INITIAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 )