1 Reply Latest reply on Oct 1, 2007 7:17 AM by Giribabums

    Out of memory eror

    Giribabums Level 1
      How can i resolve this error, i am getting the following error, if anyone has solutions please reply as early as possible , i am unable to work on flex.

      An or of memory error has occurred. You can prevent these errors in the future by increasing your heap size before your start the workbench using the -vmargs -Xms command line option. You are recommended to exit the workbench. Subsequent errors may happend and may terminate the workbench without warning. See the .log file for more details. Do you want to exit the workbench?
        • 1. Re: Out of memory eror
          Giribabums Level 1
          This is something that can occur in Eclipse when you're working with very large apps that exceed the IDE's allocated heap. Word of warning: you may need to reinstall Flex Builder, but here are some settings I've dug up that you could try:

          Modify the FlexBuilder.ini file, which is inside the Flex Builder directory (you may need to tweak these values to get a good balance for your system):

          -vmargs
          -Xms512M
          -Xmx1024M
          -XX:MaxPermSize=128M
          -XX:PermSize=256M
          -XX:MinHeapFreeRatio=20

          Explanation:
          -vmargs - This is a flag indicating Java Virtual machine flags are being defined.
          -Xms512M - Xms defines the minimum size Heap that JVM should allocate for itself when it is started .
          -Xmx1024M - The same as "Xms" but this is the maximum size that the heap can grow to if it becomes bigger than allocated Xms size.

          Ensure Xms and Xmx don't hold the same value (like 512M/512M).

          -XX:PermSize - The space that holds JVM structures and class objects,if you are using a very large number of classes. It is possible to run out of space in "Perm", and you may need to increase the size of that space.
          -XX:MaxPermSize - The same as "PermSize" but this is the maximum size that it can grow to, if it becomes bigger than allocated PermSize.
          -XX:MinHeapFreeRatio - The minimum Heap free space the JVM should maintain based on ratio value. Not necessarily needed, if you're specifying all of the other arguments.

          You can also pass these arguments to the Flex Builder IDE when it starts-up, by adding them to the end of the 'target' string on your desktop shortcut (right-click->properties).

          Example:
          TARGET: "C:\Program Files\Adobe\Flex Builder 2\FlexBuilder.exe -vmargs -Xms512M -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M"

          if its not working then it sounds like reinstalling the flex, be sure to take a backup of your work then reinstall.
          Happy coding