Jump to content

CLI -mem


Recommended Posts

Posted

Why does using -mem 1050 cause my memory in the client to increase by 200-300?

 

I thought the purpose of -mem was to allow more memory to the client if it needed it, not to increase the memory by a lot. 

When running a client without -mem, I get around 400 mb. When I allocated -mem 1050, I get around 650mb. 

This literally defeats the purpose of it because its making the client use more memory. 

Is there a way to allocate more memory without making the client use more in general?

Posted

The mem flag sets the maximum heap size with xmx.

 

-Xmx
This option sets the maximum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection. Depending upon the kind of operating system you are running, the maximum value you can set for the Java heap can vary.
 
Note: -Xmx does not limit the total amount of memory that the JVM can use.

 

 

The JVM will get more memory if its needed. If you're getting OOM exceptions then it's probably an issue with your script.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...