home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / mach / vm_statistics.h < prev   
Text File  |  1997-04-27  |  4KB  |  119 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992,1991,1990,1989,1988,1987 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    vm_statistics.h,v $
  29.  * Revision 2.4  93/01/14  17:49:14  danner
  30.  *     Standardized include symbol name.
  31.  *     [92/06/10            pds]
  32.  *     64bit cleanup.
  33.  *     [92/12/01            af]
  34.  * 
  35.  * Revision 2.3  91/05/14  17:03:07  mrt
  36.  *     Correcting copyright
  37.  * 
  38.  * Revision 2.2  91/02/05  17:37:41  mrt
  39.  *     Changed to new Mach copyright
  40.  *     [91/02/01  17:22:49  mrt]
  41.  * 
  42.  * Revision 2.1  89/08/03  16:06:55  rwd
  43.  * Created.
  44.  * 
  45.  * Revision 2.4  89/02/25  18:42:35  gm0w
  46.  *     Changes for cleanup.
  47.  * 
  48.  * Revision 2.3  89/02/07  00:54:39  mwyoung
  49.  * Relocated from sys/vm_statistics.h
  50.  * 
  51.  * Revision 2.2  89/01/30  22:08:54  rpd
  52.  *     Made variable declarations use "extern".
  53.  *     [89/01/25  15:26:30  rpd]
  54.  * 
  55.  * 30-Sep-86  Avadis Tevanian (avie) at Carnegie-Mellon University
  56.  *    Changed "reclaim" to "inactive."
  57.  *
  58.  * 22-Aug-86  Michael Young (mwyoung) at Carnegie-Mellon University
  59.  *    Made vm_stat structure kernel-only.
  60.  *
  61.  * 22-May-86  Avadis Tevanian (avie) at Carnegie-Mellon University
  62.  *    Defined vm_statistics_data_t as a real typedef so that
  63.  *    MatchMaker can deal with it.
  64.  *
  65.  * 14-Feb-86  Avadis Tevanian (avie) at Carnegie-Mellon University
  66.  *    Created.
  67.  *
  68.  */
  69. /*
  70.  *    File:    mach/vm_statistics.h
  71.  *    Author:    Avadis Tevanian, Jr., Michael Wayne Young, David Golub
  72.  *
  73.  *    Virtual memory statistics structure.
  74.  *
  75.  */
  76.  
  77. #ifndef    _MACH_VM_STATISTICS_H_
  78. #define    _MACH_VM_STATISTICS_H_
  79.  
  80. #import <mach/machine/vm_types.h>
  81.  
  82. struct vm_statistics {
  83.     integer_t    pagesize;        /* page size in bytes */
  84.     integer_t    free_count;        /* # of pages free */
  85.     integer_t    active_count;        /* # of pages active */
  86.     integer_t    inactive_count;        /* # of pages inactive */
  87.     integer_t    wire_count;        /* # of pages wired down */
  88.     integer_t    zero_fill_count;    /* # of zero fill pages */
  89.     integer_t    reactivations;        /* # of pages reactivated */
  90.     integer_t    pageins;        /* # of pageins */
  91.     integer_t    pageouts;        /* # of pageouts */
  92.     integer_t    faults;            /* # of faults */
  93.     integer_t    cow_faults;        /* # of copy-on-writes */
  94.     integer_t    lookups;        /* object cache lookups */
  95.     integer_t    hits;            /* object cache hits */
  96. };
  97.  
  98. typedef struct vm_statistics    *vm_statistics_t;
  99. typedef struct vm_statistics    vm_statistics_data_t;
  100.  
  101. #ifdef    KERNEL
  102. extern vm_statistics_data_t    vm_stat;
  103. #endif    /* KERNEL */
  104.  
  105. /*
  106.  *    Each machine dependent implementation is expected to
  107.  *    keep certain statistics.  They may do this anyway they
  108.  *    so choose, but are expected to return the statistics
  109.  *    in the following structure.
  110.  */
  111.  
  112. struct pmap_statistics {
  113.     integer_t        resident_count;    /* # of pages mapped (total)*/
  114.     integer_t        wired_count;    /* # of pages wired */
  115. };
  116.  
  117. typedef struct pmap_statistics    *pmap_statistics_t;
  118. #endif    /* _MACH_VM_STATISTICS_H_ */
  119.