Want to access DISK Cashe value, programmatically, how ?

Want to access DISK Cashe value, programmatically, how ?

Post by b.. » Sat, 11 Jan 1997 04:00:00




> Want to access DISK Cashe value, programmatically, how ?

The disk cache is currently (System 7.x) stored in the SysParmType record,
which you can retrieve by the GetSysPPtr() call documented in Inside
Macintosh:Operating Systems Utilities in chapter 7.  The misc field
contains the size of the disk cache in 32K chunks stored in bits 8-15.
This means you can currently access this information using code something
like

SysPPtr pramPtr;
short   diskCacheSize;

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

This implementation is subject to change at any time

--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)

To reply personally, remove the anti-spam "NOSPAM." from the email address
in the header.

 
 
 

Want to access DISK Cashe value, programmatically, how ?

Post by Mark Whittemo » Sat, 11 Jan 1997 04:00:00


Want to access DISK Cashe value, programmatically, how ?

I've looked thru Memory Manager of Inside Mac. I'm not seeing an API
for this.

Can I do this thru a standard system call ?

I'm speaking of the value that shows up under the Memory control panel.

 
 
 

1. MW Debug: accessing func return value?

In another newsgroups someone pointed out that it's better to write

T f()
{
    T x = g();
    return x;

than

T f()
{
    return g();

The rationale is that in the first case the return value can be
inspected from a debugger. As a fact of the matter few people code that
way.

Therefore it would be nice if the debugger displayed the return value
when stepping out of a function. This would also necessitate another
addition: marking of the subexpression that is currently evaluated.

Michael

--
Michael Schuerig                        Airtight arguments have

http://www.uni-bonn.de/~uzs90z/                -Amelie O. Rorty

2. X-Window freeware

3. HELP: How do I access Gestalt Value routines!

4. Rapid Learning of NN's using Fuzzy Logic

5. Disc Accesses causing system hang?!

6. 'lossy-to-lossless' question

7. Asking for disk access.

8. SST030 by Gadgets

9. how to intercept disk access

10. Is there a utility to log disk accesses?

11. CodeWarrior & Excel problems accessing SunOS4 CAP/AUFS disk

12. Disk accesses limited to 4K

13. How to Hide Applications Programmatically