Randomly "MAC"cessing memory

Need more memory for your Mac? How much is going to be enough? Larry Loeb tackles these and other questions as he explains the benefits of increasing your RAM and enabling Virtual Memory (VM) on your machine.

Mac memory management exchanges code between virtual memory that’s written on disk and physical RAM. This swapping allows larger programs to bring into RAM only what's needed for a particular phase of program execution. Using Virtual Memory (VM) as a management strategy can functionally cut RAM requirements. However, some program segments can't be purged to VM, and they may require more RAM than is available on the machine. Users generally call this situation a crash.

The problem
My Web browsers were crashing routinely on complex Web pages, and the performance of other programs was suffering because I had to wait while VM swapped segments to disk. I needed more RAM. But how much was going to be enough?

I run System 8.6 because I don't completely trust 9.0—yet. Maybe I’ll run 9.01 when all the gnats are fixed. I need a reliable production system, and 8.6 fits the bill, though it has some memory allocation quirks. With 64 MB of RAM, I can ensure enough space for programs only by turning on the disk-based VM to about 64 MB. Doing so gives me lots of fonts and sounds in my system, but nothing truly outrageous. It's not like all those fonts that I can use with Quark when I put out a magazine, and I have only one set of system sounds.

Conflict Catcher 8 always informs me that all my extensions take up 5 MB, but in order to run my applications, I need almost every extension that’s present. There aren’t many items on the list that I could turn off in order to save some RAM. In any event, when VM is turned off, it loads about 45 MB into RAM. If VM is turned on, on the other hand, my system takes between 25 MB and 30 MB of RAM to run. Either way, it’s a lot of memory.

I tried to deal with the RAM situation by enabling VM, and it worked—to some extent. Depending on which application I used, everything performed correctly. Surprisingly, Word handled things just fine, even with lowered memory partitions. It never crashed or lost any work. It would swap out to disk just fine. (That's the way that VM works; it swaps data or program information onto—or from—the hard disk.) Of course, it may just be that I'm not that fast a typist or that I didn’t ask Word to do very much.

Word—or any other full-featured word processor, for that matter—uses the system to keep font information available. Multiple fonts require significant memory. But Word ate only about 3 MB of RAM when it was in use. The information box in Finder noted that Finder would keep about 4 MB in VM when VM was active. If VM is turned off, however, all 6.9 MB is loaded into RAM.

Excel does the same thing. It uses about 3 MB of RAM when VM is turned on and places 7 MB into VM. All 10 MB will load into RAM if VM is turned off. Thus, VM is a tool that can work for those applications that can take advantage of it.

Most games don't care whether VM is turned on or not. Regardless of VM’s status, they try to load into RAM because most games must have all program information available all of the time. The programmers may not have been sophisticated enough to use VM and still make the game work. I don't know. But some games would load properly and then crash during play for no apparent reason.

This kind of behavior can be tolerated in a game because it's—well—a game. But Netscape 4.7 did the same thing. In the middle of loading a page, Netscape would die without cause. It wasn’t funny. I kept losing work, and something had to be done. It was obviously a memory-related problem because it was fairly random in timing but usually occurred when the program needed more memory. (I had activated the MacsBug debugger, so the errors would show up there.) Expanding the memory partition that was allocated to Netscape helped to some extent, but failures continued to occur. I learned far too much about the Netscape feedback agent that reports these problems to Netscape.

The solution
I persuaded Kingston to send me 64 MB on evaluation. Kingston is a company that I like because it has been in the memory business for years. The memory field is littered with lots of little companies that sell memory on the cheap for a short time and then go out of business. I know where Kingston is, and I can find them if the lifetime warranty that they give with their products ever needs to be used. The overall stability of a company is an important factor when I look at potential suppliers, and Kingston meets my criteria. At first, however, when the module arrived, I thought that there had been a major mistake.

The chip layout looked different from the module that was already in the machine, but the external form factor was the same. Installation was a no-brainer, except for the usual static electricity precautions. When I slid the module into the memory slot (the only way that it let me), the retention clasps locked themselves. It was as easy as pie.

The upshot of this installation was that my machine became stable. For instance, the system loads sound resources straight into RAM, rather than into VM. Earlier, if I had pressed a button while a sound was playing, my action would have interrupted the sound with an annoying pause. Such interruptions don't happen anymore. In general, the entire Finder interface actuates more quickly, and it’s crisper in its execution. It's still possible to run VM, but I don't “have” to use it now.

Whether or not you have to increase your RAM from the base level depends on your own Mac usage. If all you run is a simple word processor for short documents, an increase may not be necessary. The Finder's improved responsiveness may not be worth the extra money. If you regularly use the Web or graphic-intensive programs, however, I think that you'll agree with me that 128 MB is necessary for routine use of G3/G4-class processors.

Larry Loeb has 20 years of computer journalism experience. He was Consulting Editor at the late, lamented BYTE magazine, he launched WebWeek, he ran the online Macintosh section of BIX (the BYTE Information eXchange), and he wrote numerous articles for many major computer magazines. Recently, he also wrote a book on Secure Electronic Transactions, the protocol endorsed by MasterCard and Visa that allows merchants, cardholders, and banks to work together over the Internet. For banter, tips, and general screaming, send Larry an e-mail .

The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.

Editor's Picks

Free Newsletters, In your Inbox