1 Reply Latest reply on Feb 12, 2010 9:24 AM by Paul Reilly

    Limited Java Heap Space in FlexBuilder

    jimmyoneshot Level 1

      Ok I've managed to find the file which controls the heap space which Flex Builder allows called the FlexBuilder.ini file in Computer/C/ProgramFiles(86)/Adobe/Flex Builder 3/ but the problem is I can't raise the xms and xmx attributes above 512 as when I try to start Flex I get the message "Unable to load the java virtual machine" and then a window comes up with a message of "JVM terminted. Exit code=1"

       

      But if I leave both values at 512 it works fine but then I get an out of memory error whenever I run a big application I've made. This is why I wanted to increase them to 1024 like I have done with the perm sizes to solve this out of memory error. Does anyone know why this is happening? My system is quite new and has 2gb of RAM. The contents of my flexbuilder.ini file are:-

       

      -vmargs
      -Xms512m
      -Xmx512m
      -XX:MaxPermSize=1024m
      -XX:PermSize=1024m
      -Djava.net.preferIPv4Stack=true

        • 1. Re: Limited Java Heap Space in FlexBuilder
          Paul Reilly Level 1

          The values for MaxPermSize and PermSize seem a bit high.  Try setting them to 128M and then you should be able to bump up the max heap size.  Also setting the initial heap size to the same size as the max seems wasteful.  I suggest setting -Xms to something like 512m and -Xmx to something like 1024m.  Same pattern for PermSize and MaxPermSize.  This way Java will grab a reasonable amount of memory initially and grab more as needed.