Jump to content

CLI -mem


Juggles

Recommended Posts

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?

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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