mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove AllocInYoung/RevertToYGAtTTI from OSS Hermes config (#36679)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4e0dfedd51
commit
a83c192550
+1
-9
@@ -31,15 +31,7 @@ static std::once_flag flag;
|
||||
|
||||
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
|
||||
namespace vm = ::hermes::vm;
|
||||
auto gcConfigBuilder =
|
||||
vm::GCConfig::Builder()
|
||||
.withName("RN")
|
||||
// For the next two arguments: avoid GC before TTI by initializing the
|
||||
// runtime to allocate directly in the old generation, but revert to
|
||||
// normal operation when we reach the (first) TTI point.
|
||||
.withAllocInYoung(false)
|
||||
.withRevertToYGAtTTI(true);
|
||||
|
||||
auto gcConfigBuilder = vm::GCConfig::Builder().withName("RN");
|
||||
if (heapSizeMB > 0) {
|
||||
gcConfigBuilder.withMaxHeapSize(heapSizeMB << 20);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user