Chapter 29. Memory and Mouse Control Panels
If you are a programmer who likes to tinker with various memory
settings, such as turning virtual memory on and off or adjusting the
disk-cache size, then the scriptable Memory control panel is right up
your alley. This control panel (see Figure 29-1)
controls three aspects of computer memory usage, all of which are
scriptable:
- Disk cache
The operating system reserves a certain amount of Random Access
Memory (RAM) for the storage of frequently used bits of data. This
repository is called a disk cache. By default, your disk cache is set
to 32 KB times the amount of megabytes of physical RAM you have. My
disk cache is set to 6656 KB, or 32 KB times 208 MB. This size is
adjustable via AppleScript (see the application
class description later in this chapter).
- Virtual memory
A portion of your hard disk the operating system uses as if it were
RAM is called virtual memory (VM). This increases the computer
system's available memory; however, VM slows down
the use of some programs and uses up space that could be used to
store files. AppleScript can turn on and off or adjust the size of
VM.
- RAM disk
A RAM disk is a
part of memory that can be used like a disk for storing files. It is
the opposite of virtual memory, which uses a disk to act like memory.
An icon for the RAM disk shows up on your desktop, and you can drag
folders and files onto it. A RAM disk persists through a computer
restart, but its contents are erased on some Mac systems if the
computer is shut down or loses power abruptly. See the RAM
disk settings class description in this chapter.
The end of this chapter describes how to alter the behavior of the
mouse via AppleScript.
|