kHlpPage-iprt.cpp revision 07ca5489e6fa49b415eb5e0e42567833699a9e57
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * kHlpPage - Page Memory Allocation, IPRT based implementation.
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * Copyright (c) 2007 knut st. osmundsen <bird-kStuff-spam@anduin.net>
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * available from http://www.virtualbox.org. This file is free software;
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * General Public License as published by the Free Software Foundation,
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync/*******************************************************************************
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync* Header Files *
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync*******************************************************************************/
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync case KPROT_READWRITE: return RTMEM_PROT_READ | RTMEM_PROT_WRITE;
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync case KPROT_EXECUTE_READ: return RTMEM_PROT_EXEC | RTMEM_PROT_READ;
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync case KPROT_EXECUTE_READWRITE: return RTMEM_PROT_EXEC | RTMEM_PROT_READ | RTMEM_PROT_WRITE;
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsync return ~0U;
5e91fc5e5ea9cccb7a40636f73253d489fbe340bvboxsyncKHLP_DECL(int) kHlpPageAlloc(void **ppv, KSIZE cb, KPROT enmProt, KBOOL fFixed)
if (pv)
return rc;
if (!rc)
return rc;