Jump to content

How To: Allocate more memory to an application.


king
 Share

Recommended Posts

Java_logo_icon.thumb.png.6e59add2b531077989cd59414ba4ab52.png

 

 

Why would I want to do this?:

Typically your computer will allocate 256mb memory (RAM) to a java application (the .jar file you execute to load the client). Some computers will bottleneck under a certain environment in-game, for example a place where a lot of objects are loaded (home areas or grand exchange on OSRS) e.g players ect. This will drop the frame rate of your client usually, and could potentially cause a client to freeze. Allocating more memory provides somewhat of a safety net against freezes & lag so long as you have sufficient space/memory to do so. 

 

microsoft.png.700c0e6f6b8b19b609fb8c9d727a0133.png

Windows Guide: 

Step 1: Create a notepad file, right click your desktop or search notepad on the start menu.

Step 2: Copy & paste the following:

java -jar TheNameOfYourJarFile.jar -Xmx512m -Xss2m -Dsun.java2d.noddraw=true -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:+UseParallelGC

Step 3: Save this file as a 512mb or something which references this and make sure its a .txt file (normal text document format). This will save a code which allocates double the standard amount of ram to your application. 

Step 4: Re-do the steps 1,2 & 3 but with the following code: 

java -jar TheNameOfYourJarFile.jar -Xmx1024m -Xss2m -Dsun.java2d.noddraw=true -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:+UseParallelGC

Step 5: Once this is saved, place both in a folder where you can easily access them, it doesn't matter where, I recommend your desktop inside a folder called RSPS. 

Step 6: Open 'File Explorer' and locate 'Desktop' on the left hand side. At the top will be your directory, it will be a rectangle bar with the following information inside; 'This PC > Desktop >' or something of similar sorts, next to desktop, click the white space inside of this bar, it will highlight the word 'Desktop', press the 'Delete' button on your keyboard & type 'cmd'. This will open your command prompt (terminal if on Mac OS) and will open it inside of the Desktop directory. 

Step 7: Once you have cmd open, copy & paste either the 512mb or 1024mb codes from your files saved earlier OR copy them directly from this thread into the cmd. Press 'Enter' on your keyboard and the .jar file will run, make sure you are careful because the file name inside of the code we paste into cmd is CaSe SenSitIve, it will not be able to locate the file otherwise. 

UIHere.png.8e86ea975d70646f5b2008b53ee30b4f.png

 

apple.png.326eb916788ce567f46afaa5b75d7020.png

Mac OS Guide: 

Step 1: Create a TextEdit file, this can be found in your dock or by holding '⌘ + Spacebar' to open spotlight search and type 'TextEdit' then hit enter. 

Step 2: Copy & paste the following for a 512/1024mb version of the code: 

#!/bin/sh
java -Xmx1024m -jar /Users/yourusername/Desktop/TheNameOfYourJarFile.jar 
  
//To make a 512mb version of this code, just edit the '-Xmx1024m' to '-Xmx512m' instead. 

Step 3: Open terminal by searching for it on the spotlight, how to access spotlight can be found above. Type 'Terminal' and press enter on your keyboard (return in some languages). Copy & paste the text above into your terminal. 

Step 4: Press enter & this should execute the command to run the file, it is now being ran with more allocated memory & you may close the terminal widow. *You may recieve an 'access denied' error when trying to do this, to get around this you will need to type 'Sudo' into the terminal before C&P your code above and it will then prompt you for your users password before it loads the .jar file up. 

UIHere.png.8e86ea975d70646f5b2008b53ee30b4f.png

Happy Scaping, I hope this helps some of you! ?

 

 

Edited by king
  • Like 1
  • Confused 1

"By virtue of exchange, one man's prosperity is beneficial to all others." – Frédéric Bastiatilliassss.png

 

Link to comment
Share on other sites

I’m eager to try this because I do notice times when the RS client is too much for my PC but I mean my PC is able to handle much more intense games so I always wondered why an RSPS seems to throttle it in some instances. I’ll see if this was the problem all along, thanks bud!

  • Like 1

siggy.png

Scythes: 0                     T-bows: 0                     Purples: 0 

Link to comment
Share on other sites

On 6/28/2020 at 2:48 PM, Cox said:

I’m eager to try this because I do notice times when the RS client is too much for my PC but I mean my PC is able to handle much more intense games so I always wondered why an RSPS seems to throttle it in some instances. I’ll see if this was the problem all along, thanks bud!

Right click your task bar at the bottom of your screen, click on task manager, head over to details and 'java' should be the top process unless something is running more resources, right click 'java' and find priority, put it on 'realtime' or 'high'. This may help you @Cox:P

  • Thanks 1

"By virtue of exchange, one man's prosperity is beneficial to all others." – Frédéric Bastiatilliassss.png

 

Link to comment
Share on other sites

On 7/1/2020 at 6:24 PM, king said:

Right click your task bar at the bottom of your screen, click on task manager, head over to details and 'java' should be the top process unless something is running more resources, right click 'java' and find priority, put it on 'realtime' or 'high'. This may help you @Cox?

Thanks bro it definitely helps ?

siggy.png

Scythes: 0                     T-bows: 0                     Purples: 0 

Link to comment
Share on other sites

I even tried something similar for Minecraft after seeing that this works for RS and it's been doing wonders for me for days! For some reason there was very little memory allocated for Minecraft Java edition even though I have quite a bit of memory in total, so I allocated more to Minecraft and it runs much smoother, loads chunks in faster and stuff! ?

  • Like 1

siggy.png

Scythes: 0                     T-bows: 0                     Purples: 0 

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share

×
×
  • Create New...