Skip to content

Commit a83c192

Browse files
javachefacebook-github-bot
authored andcommitted
Remove AllocInYoung/RevertToYGAtTTI from OSS Hermes config (#36679)
Summary: Pull Request resolved: #36679 We expose a variant of `HermesExecutor.java` which allows you to set a custom max heap size. This variant also sets the `AllocInYoung/RevertToYGAtTTI`, which should never really be used without a matching call to `HermesInternal.ttiReached()`, which is not documented. Changelog: [Internal] Reviewed By: jpporto Differential Revision: D44457318 fbshipit-source-id: e91b377cbc0ac596cfbe7d1178e2657b868c1067
1 parent 4e0dfed commit a83c192

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

  • packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor

packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ static std::once_flag flag;
3131

3232
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
3333
namespace vm = ::hermes::vm;
34-
auto gcConfigBuilder =
35-
vm::GCConfig::Builder()
36-
.withName("RN")
37-
// For the next two arguments: avoid GC before TTI by initializing the
38-
// runtime to allocate directly in the old generation, but revert to
39-
// normal operation when we reach the (first) TTI point.
40-
.withAllocInYoung(false)
41-
.withRevertToYGAtTTI(true);
42-
34+
auto gcConfigBuilder = vm::GCConfig::Builder().withName("RN");
4335
if (heapSizeMB > 0) {
4436
gcConfigBuilder.withMaxHeapSize(heapSizeMB << 20);
4537
}

0 commit comments

Comments
 (0)