GMMR0Internal.h revision 4d4f336b656d46f8d301603114bb99ce635aafc0
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync * GMM - The Global Memory Manager, Internal Header.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2007 Oracle Corporation
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync * available from http://www.virtualbox.org. This file is free software;
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b2def6ea46868a11f7fd2857874e46c51932223avboxsync * Shared module registration info (per VM)
e4d7b580d72e968d3753363ab36e196a968c1947vboxsync /** Tree node. */
e4d7b580d72e968d3753363ab36e196a968c1947vboxsync /** Pointer to global shared module info. */
e4d7b580d72e968d3753363ab36e196a968c1947vboxsync /** Set if another VM registered a different shared module at the same base address. */
e4d7b580d72e968d3753363ab36e196a968c1947vboxsync /** Alignment. */
9347f1987dfb760943aba5a9ef094c6066901be3vboxsync /** Number of included region descriptors */
9347f1987dfb760943aba5a9ef094c6066901be3vboxsync /** Shared region descriptor(s). */
b2def6ea46868a11f7fd2857874e46c51932223avboxsync/** Pointer to a GMMSHAREDMODULEPERVM. */
b2def6ea46868a11f7fd2857874e46c51932223avboxsynctypedef GMMSHAREDMODULEPERVM *PGMMSHAREDMODULEPERVM;
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync/** Pointer to a GMM allocation chunk. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync/** The GMMCHUNK::cFree shift count employed by gmmR0SelectFreeSetList. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync/** Index of the list containing completely unused chunks.
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync * The code ASSUMES this is the last list. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync#define GMM_CHUNK_FREE_SET_UNUSED_LIST (GMM_CHUNK_NUM_PAGES >> GMM_CHUNK_FREE_SET_SHIFT)
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync * A set of free chunks.
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync /** The number of free pages in the set. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync /** The generation ID for the set. This is incremented whenever
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync * something is linked or unlinked from this set. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync /** Chunks ordered by increasing number of free pages.
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync * In the final list the chunks are completely unused. */
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync PGMMCHUNK apLists[GMM_CHUNK_FREE_SET_UNUSED_LIST + 1];
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync * The per-VM GMM data.
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsynctypedef struct GMMPERVM
a448d0dfcede5c742c35e4aee5f9848a4a61bf18vboxsync /** Free set for use in bound mode. */
4d4f336b656d46f8d301603114bb99ce635aafc0vboxsync /** The VM statistics. */
b2def6ea46868a11f7fd2857874e46c51932223avboxsync /** Shared module tree (per-vm). */
4d4f336b656d46f8d301603114bb99ce635aafc0vboxsync /** Hints at the last chunk we allocated some memory from. */
1205f5a22a14de7b9cf3055d6f914eac690c1715vboxsync/** Pointer to the per-VM GMM data. */