User Tag List

Results 1 to 2 of 2

Thread: Java Heap Space. Cannot Allocate more memory.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)SWF Export Module (Steam)Firefly 3D Module (Steam)
    Mephistus's Avatar
    Join Date
    Jan 2008
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Java Heap Space. Cannot Allocate more memory.

    I'm having the java heap space problem when building my game in flash build.
    I didn't had that problem before, but I think as the game became bigger and bigger I can't export it as a whole anymore.
    on jvm.config, java.args is set like "java.args=-Xmx1024m"
    if I try to make it "-Xmx2048m" or anything bigger than that I get the following:
    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap
    My computer has enough memory for that, I think it might be a limitation on flash exporter or 32-bit java? What should I do? How can I export my game again?

    *EDIT*
    Fixed the issue!

    The problem was caused because Flash Exporter(which uses flex) only allows 32-bit Java(JRE/JDK), therefore, it can't reserve more than 1024mb heap space for building swf. Sometimes in a big flash game you need more memory to build than that.
    The fix was a workaround to make Flash exporter accept 64-bit Java JRE/JDK, so you can reserve more memory and build your big-ass flash app.

    If anyone wants the fix, I can provide. Just ask =)

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Jul 2020
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mephistus View Post
    I'm having the java heap space problem when building my game in flash build.
    I didn't had that problem before, but I think as the game became bigger and bigger I can't export it as a whole anymore.
    on jvm.config, java.args is set like "java.args=-Xmx1024m"
    if I try to make it "-Xmx2048m" or anything bigger than that I get the following:
    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap
    My computer has enough memory for that, I think it might be a limitation on flash exporter or 32-bit java? What should I do? How can I export my game again?

    *EDIT*
    Fixed the issue!

    The problem was caused because Flash Exporter(which uses flex) only allows 32-bit Java(JRE/JDK), therefore, it can't reserve more than 1024mb heap space for building swf. Sometimes in a big flash game you need more memory to build than that.
    The fix was a workaround to make Flash exporter accept 64-bit Java JRE/JDK, so you can reserve more memory and build your big-ass flash app.

    If anyone wants the fix, I can provide. Just ask =)
    Hey! How are you doing? I'm having the same issue but with the Android Exporter. How did you make the Flash exporter accept 64-bit Java JRE/JDK?

Similar Threads

  1. Check free space in internal memory and sd card ?
    By EdwardF in forum Android Export Module 2.5
    Replies: 2
    Last Post: 3rd July 2014, 03:26 PM
  2. Java Heap Space Error
    By Hazard159 in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 10th May 2013, 06:03 AM
  3. [CRASH] Memory Object Runtime Crash with Allocate(
    By LB in forum Extension Development
    Replies: 8
    Last Post: 4th September 2011, 09:04 AM
  4. please correct java heap in next swf update
    By Drcooper in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 1st June 2011, 06:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •