in server/src/main/scala/com/twitter/server/Lifecycle.scala [72:81]
def beforeServing(): Unit = {
if (promoteBeforeServing() && shouldExplicitGc && hasPromoted.compareAndSet(false, true)) {
// This relies on the side-effect of a full gc that all objects in the
// young generation are promoted to the old generation.
// If this side-effect were to disappear in a future version
// of the jdk, it would not be disastrous. However, then we may choose
// to add a `System.promoteAllLiveObjects()` hook.
System.gc()
}
}