gmm.h revision cbf380b7d4a6c4cfa9457976e7eb4dbcfd273423
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * GMM - The Global Memory Manager.
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * Copyright (C) 2007 InnoTek Systemberatung GmbH
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * available from http://www.virtualbox.org. This file is free software;
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * you can redistribute it and/or modify it under the terms of the GNU
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * General Public License as published by the Free Software Foundation,
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync/** @defgroup grp_gmm GMM - The Global Memory Manager
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync/** @def IN_GMM_R0
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * Used to indicate whether we're inside the same link module as the ring 0
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * part of the Global Memory Manager or not.
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync/** @def GMMR0DECL
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync * Ring 0 GMM export or import declaration.
66b58af085e22ee26be57f98127fb49ee2e91790vboxsync * @param type The return type of the function declaration.
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync/** The chunk shift. (2^20 = 1 MB) */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync/** The allocation chunk size. */
5c4d7e2aae42bbf39793dfa686925f076a56b4d5vboxsync/** The shift factor for converting a page id into a chunk id. */
5c4d7e2aae42bbf39793dfa686925f076a56b4d5vboxsync#define GMM_CHUNKID_SHIFT (GMM_CHUNK_SHIFT - PAGE_SHIFT)
5c4d7e2aae42bbf39793dfa686925f076a56b4d5vboxsync/** The NIL Chunk ID value. */
5c4d7e2aae42bbf39793dfa686925f076a56b4d5vboxsync/** The NIL Page ID value. */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync * Over-commitment policy.
e250515922582e0410c9bcb6d24b0f17bef083a0vboxsync /** The usual invalid 0 value. */
9540ab73f6cd0c76f44f6bbfe73f89ac145390b8vboxsync /** No over-commitment, fully backed.
9540ab73f6cd0c76f44f6bbfe73f89ac145390b8vboxsync * The GMM guarantees that it will be able to allocate all of the
9540ab73f6cd0c76f44f6bbfe73f89ac145390b8vboxsync * guest RAM for a VM with OC policy. */
9540ab73f6cd0c76f44f6bbfe73f89ac145390b8vboxsync /** to-be-determined. */
9540ab73f6cd0c76f44f6bbfe73f89ac145390b8vboxsync /** The end of the valid policy range. */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync /** The usual 32-bit hack. */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync * VM / Memory priority.
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync /** The usual invalid 0 value. */
19320d55d1417c39b3b5673a53aaa5ef177242c8vboxsync /** High - avoid interrupting it if at all possible */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync /** Normal - pause, save it or kill it. */
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync /** Low - save or kill it. */
29099c2d04b11e614f1fa399fab9e9162f2788b9vboxsync /** The end of the valid priority range. */
0c69348b58bb8eabb1bea8867ee932b667bd0d34vboxsync /** The custom 32-bit type blowup. */