VirtualBox

Changeset 104848 in vbox for trunk/include


Ignore:
Timestamp:
Jun 5, 2024 9:38:20 AM (8 months ago)
Author:
vboxsync
Message:

VMM/PGM,SUPDrv,IPRT: Added a RTR0MemObjZeroInitialize function to IPRT/SUPDrv for helping zero initializing MMIO2 backing memory. bugref:10687

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r104745 r104848  
    19171917# define RTR0MemObjSize                                 RT_MANGLER(RTR0MemObjSize)             /* r0drv */
    19181918# define RTR0MemObjWasZeroInitialized                   RT_MANGLER(RTR0MemObjWasZeroInitialized)/* r0drv */
     1919# define RTR0MemObjZeroInitialize                       RT_MANGLER(RTR0MemObjZeroInitialize)   /* r0drv */
    19191920# define RTR0MemUserCopyFrom                            RT_MANGLER(RTR0MemUserCopyFrom)        /* r0drv */
    19201921# define RTR0MemUserCopyTo                              RT_MANGLER(RTR0MemUserCopyTo)          /* r0drv */
  • trunk/include/iprt/memobj.h

    r100358 r104848  
    128128 * @returns true if the allocation was initialized to zero at allocation time,
    129129 *          false if not or query not meaningful to the object type.
    130  * @param   hMemObj             The ring-0 memory object to be freed.
     130 * @param   hMemObj             The ring-0 memory object.
    131131 *
    132132 * @remarks It can be expected that memory allocated in the same fashion will
     
    136136 */
    137137RTR0DECL(bool) RTR0MemObjWasZeroInitialized(RTR0MEMOBJ hMemObj);
     138
     139/**
     140 * Initializes the allocation to zero.
     141 *
     142 * This only works on allocations, locked ring-0 memory and ring-0 mappings.  It
     143 * will return VERR_WRONG_TYPE if applied to any memory reservation,
     144 * ring-3 mapping or ring-3 locking object.
     145 *
     146 * @returns IPRT status code.
     147 * @param   hMemObj         The ring-0 memory object.
     148 * @param   fForce          If @c true, always zero the allocation, if @c false
     149 *                          it is only done when RTR0MemObjWasZeroInitialized()
     150 *                          would return false.
     151 */
     152RTR0DECL(int) RTR0MemObjZeroInitialize(RTR0MEMOBJ hMemObj, bool fForce);
    138153
    139154/**
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