title: Maven build OutOfMemoryError Chunck::new
body: <p>I get an error every time I try and build a small project (our sdk).  I have set my MAVEN_OPTS to -Xms1024m -Xmx1536m and I have a 6-12 GB of swap on both of my hard drives (so 24 GB total).  I have 6 GB of physical ram on my box of which 4 GB is allocated... so I really don't think I should be getting this error!  When I build my main project I get an OutOfMemoryError as well, but when I build again it completes the build.  This project will not complete.  Any help?  </p>
  
  <p>OS Info:</p>
  
  <pre><code>Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
  Java version: 1.6.0_22
  Java home: C:\PROGRA~2\Java\jdk1.6.0_22\jre
  Default locale: en_US, platform encoding: Cp1252
  OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
  </code></pre>
  
  <p>Stack Trace:</p>
  
  <pre><code>c:\dev\fi\fbisdk&gt;mvn -e
  + Error stacktraces are turned on.
  ...
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] An Ant BuildException has occured: java.lang.OutOfMemoryError
  
  [INFO] ------------------------------------------------------------------------
  [INFO] Trace
  org.apache.maven.lifecycle.LifecycleExecutionException: An Ant BuildException has occured: java.lang.OutOfMemoryError
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
          at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: java.lang.OutOfMemoryError
          at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
          at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
          ... 17 more
  Caused by: java.lang.OutOfMemoryError
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:357)
          at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118)
          ... 20 more
  Caused by: java.lang.OutOfMemoryError
          at java.util.zip.Inflater.init(Native Method)
          at java.util.zip.Inflater.&lt;init&gt;(Inflater.java:83)
          at org.apache.tools.zip.ZipFile.getInputStream(ZipFile.java:236)
          at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:804)
          at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:853)
          at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:499)
          at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:414)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          ... 23 more
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5 seconds
  #
  # A fatal error has been detected by the Java Runtime Environment:
  #
  # java.lang.OutOfMemoryError: requested 38168 bytes for Chunk::new. Out of swap space?
  #
  #  Internal Error (allocation.cpp:215), pid=6384, tid=600
  #  Error: Chunk::new
  #
  # JRE version: 6.0_22-b04
  # Java VM: Java HotSpot(TM) Client VM (17.1-b03 mixed mode windows-x86 )
  # An error report file with more information is saved as:
  # c:\dev\fi\fbisdk\hs_err_pid6384.log
  #
  # If you would like to submit a bug report, please visit:
  #   http://java.sun.com/webapps/bugreport/crash.jsp
  # The crash happened outside the Java Virtual Machine in native code.
  # See problematic frame for where to report the bug.
  </code></pre>