VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR0/GMMR0Internal.h@ 5072

Last change on this file since 5072 was 5064, checked in by vboxsync, 18 years ago

GMM.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/* $Id: GMMR0Internal.h 5064 2007-09-26 18:37:49Z vboxsync $ */
2/** @file
3 * GMM - The Global Memory Manager, Internal Header.
4 */
5
6/*
7 * Copyright (C) 2007 InnoTek Systemberatung GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 */
18
19#ifndef ___GMMR0Internal_h
20#define ___GMMR0Internal_h
21
22#include <VBox/gmm.h>
23
24/**
25 * The allocation sizes.
26 */
27typedef struct GMMVMSIZES
28{
29 /** The number of pages of base memory.
30 * This is the sum of RAM, ROMs and handy pages. */
31 uint64_t cBasePages;
32 /** The number of pages for the shadow pool. (Can be sequeezed for memory.) */
33 uint32_t cShadowPages;
34 /** The number of pages for fixed allocations like MMIO2 and the hyper heap. */
35 uint32_t cFixedPages;
36} GMMVMSIZES;
37typedef GMMVMSIZES *PGMMVMSIZES;
38
39
40/**
41 * The per-VM GMM data.
42 */
43typedef struct GMMPERVM
44{
45 /** The reservations. */
46 GMMVMSIZES Reserved;
47 /** The actual allocations. */
48 GMMVMSIZES Allocated;
49 /** The current number of private pages. */
50 uint64_t cPrivatePages;
51 /** The current number of shared pages. */
52 uint64_t cSharedPages;
53 /** The current number of ballooned pages. */
54 uint64_t cBalloonedPages;
55 /** The max number of pages that can be ballooned. */
56 uint64_t cMaxBalloonedPages;
57 /** The current over-comitment policy. */
58 GMMOCPOLICY enmPolicy;
59 /** The VM priority for arbitrating VMs in an out-of-memory situation. */
60 GMMPRIORITY enmPriority;
61 /** Whether the VM is allowed to allocate memory or not.
62 * This is used when the reservation update request fails or when the VM has
63 * been told to suspend/save/die in an out-of-memory case. */
64 bool fMayAllocate;
65} GMMPERVM;
66/** Pointer to the per-VM GMM data. */
67typedef GMMPERVM *PGMMPERVM;
68
69#endif
70
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette