GMMR0Internal.h revision c7814cf6e1240a519cbec0441e033d0e2470ed00
/* $Id$ */
/** @file
* GMM - The Global Memory Manager, Internal Header.
*/
/*
* Copyright (C) 2007-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___GMMR0Internal_h
#define ___GMMR0Internal_h
/**
* Shared module registration info (per VM)
*/
typedef struct GMMSHAREDMODULEPERVM
{
/** Tree node. */
/** Pointer to global shared module info. */
/** Pointer to the region addresses.
*
* They can differe between VMs because of address space scrambling or
* simply different loading order. */
/** Pointer to a GMMSHAREDMODULEPERVM. */
typedef GMMSHAREDMODULEPERVM *PGMMSHAREDMODULEPERVM;
/** Pointer to a GMM allocation chunk. */
/** The GMMCHUNK::cFree shift count employed by gmmR0SelectFreeSetList. */
#define GMM_CHUNK_FREE_SET_SHIFT 4
/** Index of the list containing completely unused chunks.
* The code ASSUMES this is the last list. */
/**
* A set of free chunks.
*/
typedef struct GMMCHUNKFREESET
{
/** The number of free pages in the set. */
/** The generation ID for the set. This is incremented whenever
* something is linked or unlinked from this set. */
/** Chunks ordered by increasing number of free pages.
* In the final list the chunks are completely unused. */
/**
* The per-VM GMM data.
*/
typedef struct GMMPERVM
{
/** Free set for use in bound mode. */
/** The VM statistics. */
/** Shared module tree (per-vm). */
/** Hints at the last chunk we allocated some memory from. */
} GMMPERVM;
/** Pointer to the per-VM GMM data. */
#endif