Currently the only place we throw OOM is during allocation. But we allow APIs to count the memory allocated by bindings/runtimes as heap memory. So in rare cases where runtimes keep allocating memory and count them as heap memory, but do not use MMTk allocation, we will see heap size exceed the heap limit, but no OOM is triggered.
We could consider add an OOM check at the end of GCs.
Currently the only place we throw OOM is during allocation. But we allow APIs to count the memory allocated by bindings/runtimes as heap memory. So in rare cases where runtimes keep allocating memory and count them as heap memory, but do not use MMTk allocation, we will see heap size exceed the heap limit, but no OOM is triggered.
We could consider add an OOM check at the end of GCs.