ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Determining the Size of the Disk Cache

Q: How do I determine the size of the Disk Cache set from the Memory Control Panel?

A: The disk cache is currently (System 7) stored in the SysParmType record, which you can retrieve with the GetSysPPtr call (documented in Inside Macintosh:Operating Systems Utilities, chapter 7). The misc field contains the size of the disk cache in 32K chunks stored in bits 8-15.

You can access this information using code such as:



#include <OSUtils.h>

short GetDiskCacheSize(void) {
    SysPPtr pramPtr;
    short diskCacheSize;

    pramPtr = GetSysPPtr();

    diskCacheSize = ( ((unsigned short)(pramPtr->misc)) >> 8 ) * 32;
        /* diskCacheSize is now the size in K of the disk cache */

    return(diskCacheSize);
}


[Jul 03 1996]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.