Open Argyraspides opened 10 months ago
Something fishy is going on. Memory is stable under high load until ~1 minute in, where the heap usage suddenly spikes from ~2MB to ~10MB. Does not appear to increase after that. Increasing the heap size is a temporary fix with "-s TOTAL_MEMORY=128MB", up from the default 16MB.
Test used: Pause the engine -> Spawn 50 triangles with the regular polygon adder (radius 50, xvel 2500, yvel 2500, rot 10, mass 1) -> Unpause the engine -> Memory spike ~1 minute in (sometimes 2).
EMCC Memory profiler indicates a sudden spike in the amount of pointers as well (from ~5000 total in the program to 70,000).
Find the root cause. EMCC build crashes consistently after a few minutes of high load.