VirtualBox

Changeset 100357 in vbox for trunk/include


Ignore:
Timestamp:
Jul 4, 2023 7:00:26 AM (18 months ago)
Author:
vboxsync
Message:

Runtime/RTR0MemObj*: Add PhysHighest parameter to RTR0MemObjAllocCont to indicate the maximum allowed physical address for an allocation, bugref:10457 [second attempt]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/memobj.h

    r100356 r100357  
    281281/**
    282282 * Allocates page aligned virtual kernel memory with contiguous physical backing
    283  * below 4GB (default tag).
     283 * (default tag).
    284284 *
    285285 * The physical memory backing the allocation is fixed.
     
    288288 * @param   pMemObj         Where to store the ring-0 memory object handle.
    289289 * @param   cb              Number of bytes to allocate. This is rounded up to nearest page.
     290 * @param   PhysHighest     The highest permitable address (inclusive).
     291 *                          Pass NIL_RTHCPHYS if any address is acceptable.
    290292 * @param   fExecutable     Flag indicating whether it should be permitted to
    291293 *                          executed code in the memory object.  The user must
     
    293295 *                          allocation to actually make it executable.
    294296 */
    295 #define RTR0MemObjAllocCont(pMemObj, cb, fExecutable) \
    296     RTR0MemObjAllocContTag((pMemObj), (cb), (fExecutable), RTMEM_TAG)
    297 
    298 /**
    299  * Allocates page aligned virtual kernel memory with contiguous physical backing
    300  * below 4GB (custom tag).
     297#define RTR0MemObjAllocCont(pMemObj, cb, PhysHigest, fExecutable) \
     298    RTR0MemObjAllocContTag((pMemObj), (cb), (PhysHigest), (fExecutable), RTMEM_TAG)
     299
     300/**
     301 * Allocates page aligned virtual kernel memory with contiguous physical
     302 * backing (custom tag).
    301303 *
    302304 * The physical memory backing the allocation is fixed.
     
    305307 * @param   pMemObj         Where to store the ring-0 memory object handle.
    306308 * @param   cb              Number of bytes to allocate. This is rounded up to nearest page.
     309 * @param   PhysHighest     The highest permitable address (inclusive).
     310 *                          Pass NIL_RTHCPHYS if any address is acceptable.
    307311 * @param   fExecutable     Flag indicating whether it should be permitted to
    308312 *                          executed code in the memory object.  The user must
     
    311315 * @param   pszTag          Allocation tag used for statistics and such.
    312316 */
    313 RTR0DECL(int) RTR0MemObjAllocContTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecutable, const char *pszTag);
     317RTR0DECL(int) RTR0MemObjAllocContTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest, bool fExecutable, const char *pszTag);
    314318
    315319/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette