Changeset 5095 for trunk/src


Ignore:
Timestamp:
Feb 11, 2001, 4:02:27 PM (25 years ago)
Author:
bird
Message:

Added arena header definition and the system wide AHs. Added vmRecalcShrBound.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/OS2KVM.h

    r5086 r5095  
    1 /* $Id: OS2KVM.h,v 1.9 2001-02-10 11:11:43 bird Exp $
     1/* $Id: OS2KVM.h,v 1.10 2001-02-11 15:02:27 bird Exp $
    22 *
    33 * OS/2 kernel VM functions.
     
    136136
    137137
     138/*
     139 * vmRecalcShrBound flags.
     140 */
     141#define VMRSBF_ARENASHR     0           /* Queries for the Shared Arena. */
     142#define VMRSBF_ARENAHIGH    4           /* Queries for the High Shared Arena. */
     143#define VMRSBF_UPDATE       1           /* Seems to update the Sentinel Arena Record. */
     144
     145
     146/*
     147 * Arena Header flags as defined in SG24-4640-00.
     148 */
     149#define VMAH_BITMAP_BYPASS 0x00000001   /* Worth bypassing bitmap */
     150#define VMAH_NO_HASH_WRAP  0x00000002   /* No hash table wraparound yet */
     151#define VMAH_GROW_DOWN     0x00000004   /* Arena grows down */
     152
    138153
    139154/*******************************************************************************
    140155*   Structures and Typedefs                                                    *
    141156*******************************************************************************/
     157
     158/*
     159 * Handle to Memory Object.
     160 */
     161typedef USHORT  VMHOB;
     162
     163/*
     164 * Handle to Arena Record.
     165 */
     166typedef VMHOB  VMHAR;
     167
     168
     169/*
     170 * VMAllocMem struct - found in SDFs.
     171 */
    142172typedef struct _vmac
    143173{
     
    146176    USHORT      ac_hob;                 /* off=6 cb=2 Object handle. */
    147177} VMAC, *PVMAC;
     178
     179
     180/*
     181 * Dummy structs we need pointers for.
     182 */
     183typedef PVOID   PVMAR;
     184typedef PVOID   PVMBM;
     185typedef PVOID   PVMHAR;
     186typedef PVOID   PVMAT;
     187
     188
     189/*
     190 * Arena Header structure as defined in SG24-4640-00 and all SDF files.
     191 */
     192typedef struct vmah_s
     193{
     194    struct vmah_s *         ah_pahNext; /* Link to next arena. */
     195    struct vmah_s *         ah_pahPrev; /* Link to previous arena. */
     196    PVMAR                   ah_parSen;  /* Pointer to the arena sentinel. */
     197    PVMAR                   ah_parFree; /* Hint of 1st free block in arena. */
     198    PVMBM                   ah_papbm;   /* Pointer to bitmap directory. */
     199    PVMHAR                  ah_paharHash;/*Hash table pointer. */
     200    PVMAT                   ah_pat;     /* Pointer to per-type info. */
     201    ULONG                   ah_fl;      /* Flags. */
     202    ULONG                   ah_laddrMin;/* Minimum address currently mapped. */
     203    ULONG                   ah_laddrMax;/* Maximum address currently mapped. */
     204    ULONG                   ah_car;     /* Count of arena entries. */
     205    ULONG                   ah_carBitmap;/*Max entry count to need bitmap. */
     206    ULONG                   ah_lbmNumbMax;  /* Max bitmap number */
     207    ULONG                   ah_lbmeNumbMax; /* Max bitmap entry number */
     208    ULONG                   ah_lHashNumbMax;/* Max hash table index. */
     209    VMHOB                   ah_hob;     /* Arena header pseudo-handle. */
     210    USHORT                  ah_filler;  /* Filler to 4-byte align struct. */
     211} VMAH, *PVMAH;
     212
     213
     214/*******************************************************************************
     215*   Global Variables                                                           *
     216*******************************************************************************/
     217/**
     218 * Virtual Address Limit - this pointer might be NULL!
     219 */
     220extern ULONG *pVirtualAddressLimit;
     221#define VirtualAddressLimit (pVirtualAddressLimit ? *pVirtualAddressLimit : 0x20000000)
     222
     223/**
     224 * System arena header.
     225 */
     226extern PVMAH pahvmSys;
     227#define ahvmSys (*pahvmSys)
     228
     229/**
     230 * Shared arena header.
     231 */
     232extern PVMAH pahvmShr;
     233#define ahvmShr (*pahvmShr)
     234
     235/**
     236 * High Shread arena header - only aurora and Warp Server Advanced SMP.
     237 */
     238extern PVMAH pahvmhShr;
     239#define ahvmhShr (*pahvmhShr)
    148240
    149241
     
    188280#endif
    189281
    190 #endif
     282/**
     283 * This function seems to find the top of the private arena.
     284 * And for high arena kernels (AURORA and W3SMP?) it is modified
     285 * to calc the top of the high private arena, given flFlag = 4.
     286 * --
     287 * This function is really intented for resizing / recaling the size of
     288 * the shared arena(s). But, it's useful for finding the highest used
     289 * private arena(s).
     290 * @param   flFlags             VMRSBF_* flags.
     291 * @param   pulSentinelAddress  Pointer to return variable (optional).
     292 */
     293VOID    KRNLCALL vmRecalcShrBound(
     294    ULONG   flFlags,
     295    PULONG  pulSentinelAddress);
     296
     297
     298#endif
Note: See TracChangeset for help on using the changeset viewer.