This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adjusting Memory Usage in Megamek called by MekHQ
#1
Hi everyone,

I realize that you can edit a file (MegaMek.l4j.ini) included in the Megamek zip to run Megamek with more RAM.

How do I do that with the files included in MekHQ?

Everything I have tried has resulted in failure... Very embarrassing, but I'm hoping someone can help me out.

Thanks,
-Mike
Reply
#2
I love Linux lol... I just made a hack version of the startup.sh Wink

I assume you can just make a batch file that contains this line (for 512MB):
java -Xmx512m -jar MekHQ.jar

I've attached my startup script for MekHQ in case it'll help anyone else.


Attached Files
.sh   startup.sh (Size: 952 bytes / Downloads: 5)
Reply
#3
Pretty much.  This is the contents of my batch file:

@echo off
echo Starting MekHQ...
echo.

java -Xmx1024m -jar MekHQ.jar

:done
@echo on
Reply
#4
And that adjusts how much memory Megamek will have available when I start a scenario? weird.
Reply
#5
If you start MegaMek from within MHQ, then they are sharing the same basic memory.  the -Xmx command sets the maximum memory, which I think defaults to 256m on most machines. Eventually, we will get OS-specific releases and there will be an l4j.ini file for MHQ as well, but for now, you need to create a batch file or run from the dos command line.
Reply
#6
Awesome. thanks, everyone!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  High memory usage resolving scenarios with drophips, warships etc SirMegaV 28 9,791 07-14-2014, 09:58 AM
Last Post: Netzilla
  Memory usage pheonixstorm 10 3,817 04-29-2014, 12:04 PM
Last Post: ralgith
  Usage for remote players sshagent 9 4,668 09-21-2012, 05:19 AM
Last Post: sshagent

Forum Jump:


Users browsing this thread: 1 Guest(s)