Commit 2a56cd6
committed
fix(ios): disable the cppgc caged heap
cppgc_enable_caged_heap defaults to true on arm64 and does not track
v8_enable_pointer_compression, so it stayed on despite that being off.
Enabling it forces cppgc pointer compression, whose reservation asks for
twice the cage to satisfy alignment, and V8::Initialize() calls
cppgc::InitializeProcess unconditionally -- so every iOS app reserved
8 GiB of 4 GiB-aligned address space at startup without using cppgc.
iOS budgets virtual address space per process by device RAM. On smaller
devices no such hole exists, the four reservation attempts all fail, and
Oilpan's fatal OOM handler aborts before any JS runs: an iPad Air crashed
on launch where an iPad Pro was fine.
Costs cppgc pointer compression, its young generation and a write-barrier
fast path. Nothing in the cppgc API changes and CppHeap is unaffected.
Android keeps the cage; 64-bit has the address space and 32-bit cannot
enable it anyway.1 parent 1650a17 commit 2a56cd6
2 files changed
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
0 commit comments