Andrew, I agree that any change would have to be tested on a variety of platforms. Historically, the limit used to be 512m, but has crept up over recent times. My investigations have been to understand why we have been forced to increase this number; as a result we found out that a memory leak was causing javadoc to retain references to the source code buffers for all the files it was reading.
Since javadoc is all Java code, it is reasonable to believe the problem, and the fix, would apply to all platforms, which is why I posted the update here. However, additional investigations show that the performance does suffer if we reduce the Xmx value. So the good news is that we can now reduce the value; the question is, do we want to? FWIW, I'm still trying to understand why we need even 512m. But that will be another story. -- Jon On 04/11/2013 03:26 AM, Andrew Hughes wrote:
----- Original Message -----Build folk, As a result of these two changesets now in tl/langtools, we can now reduce the memory requirements for javadoc in (root)common/makefiles/javadoc/Javadoc.gmk. changeset: 1678:3f3cc8d3f13c tag: tip user: jjg date: Mon Apr 08 11:57:37 2013 -0700 summary: 8011677: EndPosTables should avoid hidden references to Parser changeset: 1677:b402b93cbe38 user: jjg date: Mon Apr 08 11:54:26 2013 -0700 summary: 8011676: Instances of Tokens.Comment should not be defined in inner classes I have done builds with the memory limited to 512m, down from 1024m. I did try further, with 384m, but that was too much of a reduction. $ hg diff diff -r 11c057460b91 common/makefiles/javadoc/Javadoc.gmk --- a/common/makefiles/javadoc/Javadoc.gmk Fri Apr 05 14:49:54 2013 -0700 +++ b/common/makefiles/javadoc/Javadoc.gmk Tue Apr 09 18:42:37 2013 -0700 @@ -47,7 +47,7 @@ BUILD_NUMBER=$(JDK_BUILD_NUMBER) JAVADOC_CMD = $(JAVA) \ - -Xmx1024m \ + -Xmx512m \ -Djava.awt.headless=true \ $(NEW_JAVADOC) \ -bootclasspath $(JDK_OUTPUTDIR)/classes -- JonI'd be wary of changing this because, in my experience, it varies depending on VM and architecture. What was tested for these figures?
