I’m working with a memory testing program that continuously allocates heap memory, targeting WebGL on iOS devices. I’ve noticed an issue: typically, an iPhone with 6GB of RAM can only allocate an additional 300MB before the browser refreshes, likely due to an OOM (out-of-memory) error. However, if I restart the phone and run the program again, I can allocate around 2000MB. After regular use, like social media and videos, it reverts to only 300MB. What causes this discrepancy, and are there any solutions?