Increase lint JVM heap size to 4GB
This aligns with the heap sizes used for D8/R8/javac. If needed, we can
increase further to 8GB to align with ErrorProne and avoid transient OOM
issues for certain targets.
Bug: 387971153
Test: m + presubmit
Flag: EXEMPT bugfix
Change-Id: I00f2d8f26121f7b48df80c5d14a222d550d9228c
diff --git a/java/lint.go b/java/lint.go
index ac90e19..9c6b93b 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -470,7 +470,7 @@
cmd := rule.Command()
- cmd.Flag(`JAVA_OPTS="-Xmx3072m --add-opens java.base/java.util=ALL-UNNAMED"`).
+ cmd.Flag(`JAVA_OPTS="-Xmx4096m --add-opens java.base/java.util=ALL-UNNAMED"`).
FlagWithArg("ANDROID_SDK_HOME=", lintPaths.homeDir.String()).
FlagWithInput("SDK_ANNOTATIONS=", annotationsZipPath).
FlagWithInput("LINT_OPTS=-DLINT_API_DATABASE=", apiVersionsXMLPath)