Mouad Debbar 111ba5aae9 [web] Start with a smaller memory allocation for CanvasKit (flutter/engine#56900)
Confirmed that a sample Flutter app starts with a 32MB memory allocation for CanvasKit instead of 128MB.

| Before | After|
|-|-|
| ![image](https://github.com/user-attachments/assets/5f6f2d4d-9155-499e-b20e-a15e3d8b53ab) | ![image](https://github.com/user-attachments/assets/bf1956c4-2d2a-44a8-b781-b110be93bc6a) |

Fixes https://github.com/flutter/flutter/issues/159499

<hr>

Relevant emscripten settings:
- [`INITIAL_MEMORY`](https://emscripten.org/docs/tools_reference/settings_reference.html#initial-memory)
- [`ALLOW_MEMORY_GROWTH`](https://emscripten.org/docs/tools_reference/settings_reference.html#allow-memory-growth)
- [`MEMORY_GROWTH_GEOMETRIC_STEP`](https://emscripten.org/docs/tools_reference/settings_reference.html#memory-growth-geometric-step)
- [`MEMORY_GROWTH_GEOMETRIC_CAP`](https://emscripten.org/docs/tools_reference/settings_reference.html#memory-growth-geometric-cap)
- [`ABORTING_MALLOC`](https://emscripten.org/docs/tools_reference/settings_reference.html#aborting-malloc)

Relevant emscripten code:
- 58889f9f20/src/library.js (L290)
- Emscripten tries to grow memory by the provided growth factor. If it fails, it tries to grow by 50% of that amount. If it fails, it tries 25%. Then it gives up and fails gracefully.
2024-12-04 21:41:50 +00:00
Description
A vendored version of the flutter engine for firka :3
323 MiB
Languages
Dart 75.4%
C++ 16.4%
Objective-C++ 2.7%
Java 2.7%
Objective-C 0.6%
Other 1.8%