Washington Apple Pi

A Community of Apple iPad, iPhone and Mac Users

Memory Mapper 1.5

Reviewed by Brian Mason

Washington Apple Pi Journal, March/April 2001, reprint information

Sometimes the best things in life are free. This is certainly the case with Memory Mapper by R. Fronabarger. This little program takes the mystery out of how your computer is using the memory you have made available to all the programs you are trying to run on your Mac. It does this by drawing you a picture of exactly what is tying up the memory and how much memory is being used.

What Does It Do?

A memory map is a graphical representation of the address space used to show where computer programs or applications and the associated data are stored in RAM and where they are in relation to each other. Memory Mapper draws this map for your Macintosh. When the Finder reports "Not enough memory to load application" it is often because there is not enough contiguous memory available. Memory Mapper makes it easy to see how memory space can become fragmented. You can also see graphically if there is enough available memory before you launch that next application and crash your machine.

Fig. 1

What it shows you

Look at Figure 1. This shows Memory Mapper running on my Mac. I launched it immediately after launching Wingz, my spreadsheet application. This display shows that I have 128 MB of built-in RAM. At the top of the map, you see that I have Virtual Memory (VM) turned on. Memory Mapper displays five types of memory blocks. At the very bottom of the map are the Low Memory Globals. This is the location for many system parameters. Above the Low Memory Globals is the System Heap. This is the RAM that the System uses for storing its current resources such as fonts, icons, and sounds. At the top of the map is High Memory. This portion of RAM is used for debuggers, sound and video buffers, and the disk cache. In between low memory and high memory is the memory used for processes--Applications, desk accessories, and background processes.

Immediately to the right of the map, is a bar that shows the areas that have been mapped to Virtual Memory. The black areas are what are currently stored in the backing file on the hard disk. If you look at Figure 5, you will see what happens when Virtual Memory is turned off. Even though Wingz is no longer running, the System Heap at the bottom of the map is using more memory.

Fig. 5

To the right side of the map is the Item List which shows the name of the application running in each memory partition, its type, signature, size, and the amount of free space left in that partition. Right under High Memory you see all of the programs that are launched at start up and perhaps unbeknownst to you keep running until you shut your computer down. These programs are sitting there monitoring your computer, waiting just in case you need them. If you are desperate for a few extra bytes of memory and you are absolutely certain you do not need one of these "stay resident" programs, Memory Mapper allows you to select the item and from the menu, issue an "AppleEvent 'quit' message" to a currently-running process. This allows you to quit some processes which you normally can't quit from, such as the Finder or certain background processes. For example, if you know you won't be using your DVD drive, you could quit it. The nice thing about these "stay resident" programs is that they will all then move up to fill the vacated memory space, giving you more contiguous free memory below.

Fig. 3

Freeing Up Memory

The reason contiguous memory is so important is because when you launch an application, it must have one complete chunk of contiguous memory to run in. It won't divide itself up to fill available space like a file will do when it is stored on your hard drive. Look at Figure 3. This shows how I have filled much of my available memory by running AppleWorks, FileMaker Pro, Graphic Converter, and WordPerfect all at the same time. You will notice the darker areas on the map of each memory partition. This is how much memory of the memory allocated to the application is actually being used. You may find that you have allocated way too much memory to an application and so you would be able to go into "Get Info" and reduce the memory allocation. In the case of FileMaker Pro on my machine, I may need to allocate more memory to the application since out of 12 MB allocated, I only have about 1.4 MB free.

Fig. 4

Now look at Figure 4. This shows what happens to my memory when I quit FileMaker. Unlike the "stay resident" processes which moved up to fill the vacated memory, Graphic Converter and WordPerfect stay where they are, leaving my memory fragmented. Quitting FileMaker did free up the 12 MB of memory that it was using, but the largest chunk of free memory that I had above the System Heap was actually reduced in size by 236 bytes when I quit FileMaker.

You can also run into memory problems if you have an application running that is residing in memory next to the System Heap. In System 7 and later the System Heap grows dynamically. When the Finder reports "Insufficient memory for this operation" it is usually because an application's memory partition is next to the System Heap and is preventing it from growing, not because there is not enough free memory in the middle somewhere. Quitting the application residing next to the System Heap can allow the System Heap to expand and let the other application work.

By taking a peak at Memory Mapper, you will know what applications you need to quit in order to free up enough memory to launch your next application.

Process Info Dialog

If you double-click on one the items in the Item List you will get a dialog that provides more information about that memory partition:

Process: The name of the process.
Type: Memory block type: application, desk accessory, or background process.
Address: The base address of the process or partition.
PSN: Process Serial Number (high/low).
Launched: Time and date when the process was started.
Active Time: Accumulated CPU time (hh:mm:ss)
Path: Path to process's file.

Memory Mapper requires System 7.1 and a 68020 Mac or later and is available on the WAP TCS File Transfer area.

 I give this program 8 pie slices out of 8.