Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Mac OSX Support (https://www.gnutellaforums.com/general-mac-osx-support/)
-   -   Adding memory to programs in OS X? (https://www.gnutellaforums.com/general-mac-osx-support/11636-adding-memory-programs-os-x.html)

Russell May 21st, 2002 06:50 PM

Adding memory to programs in OS X?
 
Hi, I'm new to OS X and I'm wondering about how to do this.
This is one of the things I always had to do with Limewire in OS 9 to get it to work.

MacTerminator May 22nd, 2002 03:29 PM

In Mac OS X, memory is managed dynamically by the system so the option you had in OS 9 and previous to change the required RAM in the information window no longer exists.

Unregistered June 1st, 2002 05:11 AM

Actually that's not true since LimeWire is written in Java. The JVM only uses as much as you tell it, and the defaults are quite low. There's no way to modify the amount of memory used by the JVM after the program has started, so the start scripts would have to be modified.

I tried modifying runLime.sh:

java -ms32M -mx64M -jar RunLime.jar

Unregistered June 2nd, 2002 06:18 PM

No... I think Apple's implementation of Java will give the program as much RAM as it needs.
Your looking way to much at things that are meant for UNIX that for all we know Jar Launcher may just ignore.

Unregistered June 2nd, 2002 06:19 PM

And I think changing UNIX nice variables will help the performance more than allocating more RAM anyways.

jjupin June 10th, 2002 10:22 AM

Memory allocation for java apps on Mac OS X
 
Actually, the previous poster was correct in setting the -mx -ms flags for setting the heap allocated for RAM for the JVM. The default is 32M (some default to 64M). Unix by nature will let a program grow, but the JVM only knows the amount of heap it's been given. Once it reaches that limit, it will start spitting out "OutOfMemory Exceptions"... So, it's best to set those flags higher (in increments of 32M)...

Oh, btw, adding memory to the JVM heap does increase performance - it's not swapping as much and has more room to store more objects. But, you need to see how much your system has - thus, if you have 512M TiBook, setting the java heap to 128M should be fine ... you get the idea... :-)

Now, as for when you double-click the icon, I don't know if the app will look to the LimeWire.sh script or not... If not, then you'll need to run the script when running Limiewire, rather than double-clicking on it's icon...

cool.

Theala Sildorian June 12th, 2002 01:33 PM

Re: Memory allocation for java apps on Mac OS X
 
Quote:


Oh, btw, adding memory to the JVM heap does increase performance - it's not swapping as much and has more room to store more objects. But, you need to see how much your system has - thus, if you have 512M TiBook, setting the java heap to 128M should be fine ... you get the idea... :-)

cool. [/B]
I'm a little confused. I want to try this . . .when you talk about the JVM heap, are you talking about modyfying the runLimewire.sh or are you talking about modifying something else for overall Java performance?

Thanx in advance.

Theala

jjupin June 12th, 2002 04:51 PM

quote:

I'm a little confused. I want to try this . . .when you talk about the JVM heap, are you talking about modyfying the runLimewire.sh or are you talking about modifying something else for overall Java performance?

-- end quote --

In java, when you run a program, you usually type something like:

%> java MyApp

This will then run in the standard JVM. To increase the memory (heap), you would do something like this:

%> java -mx 128M -ms 128M MyApp

In order to do this with the LimeWire app, you would need to modify the run script that it has. (the .sh) Thus, to modify this, I would "vi" into it and change the line to:

<b>java -mx128M -ms128M -jar RunLime.jar</b>

That should do it for ya! Give that a whirl!

peace. JOe...

mdouma46 June 19th, 2002 08:40 AM

My God! At least a 2x speed improvement here!

I edited the runLime.sh file changing it to:

java -mx256M -ms256M -jar RunLime.jar

I have 768 MB of RAM, so adjust it for your machine.

Theala Sildorian June 20th, 2002 01:02 AM

Amen! I tried the same thing, using 128M. Got a spiffy speed improvement in terms of switching tabs. I used to get this "hesitation" when scrolling, searching, and switching tabs. It is totally gone. Limewire really sings now.

Great hack. Thanks!


All times are GMT -7. The time now is 05:42 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.