Menu

#13 java.lang.OutOfMemoryError: Java heap space

open
5
2005-10-27
2005-10-27
No

Exception in thread "main" java.lang.OutOfMemoryError:
Java heap space

CPU (AMD3700+) goes to 100% while running, but memory
(1 Gb + pagefile) is still plenty (300Mb free).

I used it on a module having around 2 Gb of hakpack
resources and around 150 areas.

Command used: MiniMapExport.cmd
D:\games\nwn\modules\mymodule.mod -nwn D:\games\nwn
-useAreaName -d D:\mymodule\AreaMaps

Discussion

  • Paul Speed

    Paul Speed - 2005-10-27

    Logged In: YES
    user_id=652870

    Java by default limits itself to a pretty small heap. I
    should probably change the setup file to generate a script
    with an increased heap size.

    In the meantime, you can adjust the MiniMapExport.cmd script
    yourself. Basically, right after the "@java" put a -Xmx256m
    so the command would like something like:
    @java -Xmx256m -cp...

    This should increase Java's maximum heap size to 256 meg. I
    think it defaults to 32 or 64. You can increase it larger
    as needed but I'd be sort of surprised if you needed to go
    too large. The minimap exporter doesn't cache all 2 gb,
    just what it needs.

    I should probably add this to the documentation. Let me
    know how that works out for you.

     
  • Richard de Vroede

    Logged In: YES
    user_id=561842

    That not only did the trick, it also sped up the process
    enormously..
    It's done now in about 10 seconds!!

     

Log in to post a comment.

MongoDB Logo MongoDB