VirtualBox

Changeset 92246 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 6, 2021 3:10:49 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/RTR0MemObj: Added RTR0MemObjWasZeroInitialized and a couple of flags with which the backend can feed it the necessary info. It would be good to try avoid zeroing memory twice when we can. bugref:10093

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r91790 r92246  
    18641864# define RTR0MemObjReserveUserTag                       RT_MANGLER(RTR0MemObjReserveUserTag)   /* r0drv */
    18651865# define RTR0MemObjSize                                 RT_MANGLER(RTR0MemObjSize)             /* r0drv */
     1866# define RTR0MemObjWasZeroInitialized                   RT_MANGLER(RTR0MemObjWasZeroInitialized)/* r0drv */
    18661867# define RTR0MemUserCopyFrom                            RT_MANGLER(RTR0MemUserCopyFrom)        /* r0drv */
    18671868# define RTR0MemUserCopyTo                              RT_MANGLER(RTR0MemUserCopyTo)          /* r0drv */
  • trunk/include/iprt/memobj.h

    r91448 r92246  
    109109 */
    110110RTR0DECL(RTHCPHYS) RTR0MemObjGetPagePhysAddr(RTR0MEMOBJ MemObj, size_t iPage);
     111
     112/**
     113 * Checks whether the allocation was zero initialized or not.
     114 *
     115 * This only works on allocations.  It is not meaningful for mappings, reserved
     116 * memory and entered physical address, and will return false for these.
     117 *
     118 * @returns true if the allocation was initialized to zero at allocation time,
     119 *          false if not or query not meaningful to the object type.
     120 * @param   hMemObj             The ring-0 memory object to be freed.
     121 *
     122 * @remarks It can be expected that memory allocated in the same fashion will
     123 *          have the same initialization state.  So, if this returns true for
     124 *          one allocation it will return true for all other similarly made
     125 *          allocations.
     126 */
     127RTR0DECL(bool) RTR0MemObjWasZeroInitialized(PRTR0MEMOBJ hMemObj);
    111128
    112129/**
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