How do I change the memory settings on a Mac?

Please post questions that you think belong here in the parent forum for discussion first. Then use the "Report this Post" function to alert a moderator that the post/thread should be moved. Common thread examples should not include macro programming, but rather user interface issues or usability issues.

Moderators: dorpond, trevor, Azhrei

Forum rules
Do not conduct discussion here. Do that in the parent forum.
Locked
User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

How do I change the memory settings on a Mac?

Post by Azhrei »

These instructions apply to OSX users who have downloaded the .dmg file from the RPTools web site and installed MapTool from it. They were most recently tested on Snow Leopard 10.6.3. OSX users who are running MapTool using the WebStart approach won't need these instructions since the CUSTOMIZATION link on the Launch page allows the memory settings to be configured there.

(Unfortunately, Apple doesn't make this process easy. Their belief seems to be that the application provider should allow these values to be changed from inside the application but they didn't consider that the Java memory settings cannot be changed from inside Java. :()

The installer in the .dmg creates what Apple calls an "app" -- it's a directory with the .app filename extension that contains all of the files necessary for the application. This includes the configuration file when the program is Java-based.

Here's the procedure for editing the configuration file (called a property list). Note that I'm describing the technique that uses the OSX TextEdit program because the only property list editor I have on my machine is under the /Developer directory -- which is an optional install for OSX so most people won't have it.

1. Ctrl-click (or right-click) on the application icon (the filename should end with .app).

2. Choose Show Package Contents and a Finder window will open.

3. Open the Contents folder and locate the Info.plist file.

4. Ctrl-click (or right-click) on that file and choose Open With > Other...

5. In the Choose Application dialog that opens, locate TextEdit and double-click on it.

6. The Info.plist file is now open. There is an entry in the file called VMOptions (mine was about two-thirds of the way down the file) that should be changed to match the memory characteristics your GM wants you to use. Here's what mine looks like in case you want a reference for the following steps:

Code: Select all

		<key>VMOptions</key>
		<array>
			<string>-Xmx768m</string>
			<string>-Xms64m</string>
			<string>-Xss3m</string>
		</array>
7. Replace your entries with the example text in Step 6. However, your GM may have directed you to use a particular value for the "maximum memory" setting. If so, replace the 768 number with the new maximum. The GM may also ask you to change the "stack size" amount -- that's the 3 number following the ss. (The 64 number never needs to be changed.) If you have other entries between the <array> and </array> lines, they should be removed because you're specifying completely new values.

8. Use Cmd-Q and then choose Save. You can close the Finder window that opened as well.

You're all done!

I hope that helps, FB. Let me know if he runs into any problems. Now that I've written this up, I should add it to the User FAQ subforum. ;)

Locked

Return to “WIP - User FAQ”