ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >
Legacy Document
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:
Technical Q&A ME04
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]
|
We’re sorry, an error has occurred.
Please try submitting your feedback later.
Thank you for providing feedback!
Your input helps improve our developer documentation.