alloc-r0drv-solaris.c revision e7e8a6cb1597db3e0a1a83733e1d90e7a1688647
/* $Id$ */
/** @file
* innotek Portable Runtime - Memory Allocation, Ring-0 Driver, Solaris.
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "the-solaris-kernel.h"
#include "r0drv/alloc-r0drv.h"
/**
* OS specific allocation function.
*/
{
if (fFlags & RTMEMHDR_FLAG_ZEROED)
else
if (pHdr)
{
pHdr->u32Padding= 0;
}
else
return pHdr;
}
/**
* OS specific free function.
*/
{
}
/**
* Allocates physical contiguous memory (below 4GB).
* The allocation is page aligned and the content is undefined.
*
* @returns Pointer to the memory block. This is page aligned.
* @param pPhys Where to store the physical address.
* @param cb The allocation size in bytes. This is always
* rounded up to PAGE_SIZE.
*/
{
/* Allocate physically contiguous page-aligned memory. */
if (rc != DDI_SUCCESS)
return NULL;
return virtAddr;
}
{
if (pv)
}