VirtualBox

Changeset 91478 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 29, 2021 11:36:54 PM (3 years ago)
Author:
vboxsync
Message:

IPRT/memobj: Added pszTag to rtR0MemObjNew.

Location:
trunk/src/VBox/Runtime
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/memobj.h

    r91446 r91478  
    217217    } u;
    218218
     219#if defined(DEBUG)
     220    /** Allocation tag string. */
     221    const char     *pszTag;
     222#endif
    219223} RTR0MEMOBJINTERNAL;
    220224
     
    497501DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage);
    498502
    499 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb);
     503DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb, const char *pszTag);
    500504DECLHIDDEN(void) rtR0MemObjDelete(PRTR0MEMOBJINTERNAL pMem);
    501505DECLHIDDEN(int) rtR0MemObjFallbackAllocLarge(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, size_t cbLargePage, uint32_t fFlags,
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r91446 r91478  
    738738                 * Create the IPRT memory object.
    739739                 */
    740                 PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), enmType, pv, cb);
     740                PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), enmType, pv, cb, NULL);
    741741                if (pMemDarwin)
    742742                {
     
    964964             * Create the IPRT memory object.
    965965             */
    966             PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     966            PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    967967            if (pMemDarwin)
    968968            {
     
    10231023         * Create the IPRT memory object.
    10241024         */
    1025         PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb);
     1025        PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    10261026        if (pMemDarwin)
    10271027        {
     
    10531053             * Create the IPRT memory object.
    10541054             */
    1055             PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb);
     1055            PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    10561056            if (pMemDarwin)
    10571057            {
     
    12001200                         */
    12011201                        PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_MAPPING,
    1202                                                                                         pv, cbSub ? cbSub : pMemToMap->cb);
     1202                                                                                        pv, cbSub ? cbSub : pMemToMap->cb, NULL);
    12031203                        if (pMemDarwin)
    12041204                        {
     
    12921292                 */
    12931293                PRTR0MEMOBJDARWIN pMemDarwin = (PRTR0MEMOBJDARWIN)rtR0MemObjNew(sizeof(*pMemDarwin), RTR0MEMOBJTYPE_MAPPING,
    1294                                                                                 pv, cbSub ? cbSub : pMemToMap->cb);
     1294                                                                                pv, cbSub ? cbSub : pMemToMap->cb, NULL);
    12951295                if (pMemDarwin)
    12961296                {
  • trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c

    r91446 r91478  
    364364DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    365365{
    366     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
    367                                                                        RTR0MEMOBJTYPE_PAGE, NULL, cb);
     366    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL);
    368367    if (!pMemFreeBSD)
    369368        return VERR_NO_MEMORY;
     
    390389DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    391390{
    392     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
    393                                                                        RTR0MEMOBJTYPE_LOW, NULL, cb);
     391    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL);
    394392    if (!pMemFreeBSD)
    395393        return VERR_NO_MEMORY;
     
    409407DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    410408{
    411     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
    412                                                                        RTR0MEMOBJTYPE_CONT, NULL, cb);
     409    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL);
    413410    if (!pMemFreeBSD)
    414411        return VERR_NO_MEMORY;
     
    436433
    437434    /* create the object. */
    438     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
    439                                                                        enmType, NULL, cb);
     435    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb, NULL);
    440436    if (!pMemFreeBSD)
    441437        return VERR_NO_MEMORY;
     
    490486
    491487    /* create the object. */
    492     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     488    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    493489    if (!pMemFreeBSD)
    494490        return VERR_NO_MEMORY;
     
    514510
    515511    /* create the object. */
    516     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOCK, (void *)AddrStart, cb);
     512    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOCK,
     513                                                                       (void *)AddrStart, cb, NULL);
    517514    if (!pMemFreeBSD)
    518515        return VERR_NO_MEMORY;
     
    587584     * Create the object.
    588585     */
    589     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb);
     586    PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_RES_VIRT,
     587                                                                       NULL, cb, NULL);
    590588    if (!pMemFreeBSD)
    591589        return VERR_NO_MEMORY;
     
    698696        AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc));
    699697
    700         PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD),
    701                                                                            RTR0MEMOBJTYPE_MAPPING,
    702                                                                            (void *)Addr,
    703                                                                            cbSub);
     698        PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING,
     699                                                                           (void *)Addr, cbSub, NULL);
    704700        if (pMemFreeBSD)
    705701        {
     
    788784         * Create a mapping object for it.
    789785         */
    790         PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD),
    791                                                                            RTR0MEMOBJTYPE_MAPPING,
    792                                                                            (void *)AddrR3,
    793                                                                            pMemToMap->cb);
     786        PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING,
     787                                                                           (void *)AddrR3, pMemToMap->cb, NULL);
    794788        if (pMemFreeBSD)
    795789        {
  • trunk/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c

    r91446 r91478  
    204204    /* Create the object. */
    205205    PRTR0MEMOBJHAIKU pMemHaiku;
    206     pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), type, NULL, cb);
     206    pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), type, NULL, cb, NULL);
    207207    if (RT_UNLIKELY(!pMemHaiku))
    208208        return VERR_NO_MEMORY;
     
    290290
    291291    /* Create the object. */
    292     PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     292    PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    293293    if (!pMemHaiku)
    294294        return VERR_NO_MEMORY;
     
    328328
    329329    /* Create the object. */
    330     PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_LOCK, pvStart, cb);
     330    PRTR0MEMOBJHAIKU pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(*pMemHaiku), RTR0MEMOBJTYPE_LOCK, pvStart, cb, NULL);
    331331    if (RT_UNLIKELY(!pMemHaiku))
    332332        return VERR_NO_MEMORY;
     
    465465        /* Create the object. */
    466466        pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), RTR0MEMOBJTYPE_MAPPING, pvMap,
    467                                                     pMemToMapHaiku->Core.cb);
     467                                                    pMemToMapHaiku->Core.cb, NULL);
    468468        if (RT_UNLIKELY(!pMemHaiku))
    469469            return VERR_NO_MEMORY;
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r91477 r91478  
    347347     * the page pointer array.
    348348     */
    349     PRTR0MEMOBJLNX  pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), enmType, NULL, cb);
     349    PRTR0MEMOBJLNX  pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), enmType,
     350                                                            NULL, cb, NULL);
    350351    if (!pMemLnx)
    351352        return VERR_NO_MEMORY;
     
    11671168    AssertMsgReturn(PhysAddr == Phys, ("%#llx\n", (unsigned long long)Phys), VERR_ADDRESS_TOO_BIG);
    11681169
    1169     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     1170    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    11701171    if (!pMemLnx)
    11711172    {
     
    12111212     * Allocate the memory object and a temporary buffer for the VMAs.
    12121213     */
    1213     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
     1214    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK,
     1215                                            (void *)R3Ptr, cb, NULL);
    12141216    if (!pMemLnx)
    12151217    {
     
    13801382     * Allocate the memory object.
    13811383     */
    1382     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, pv, cb);
     1384    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJLNX, apPages[cPages]), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    13831385    if (!pMemLnx)
    13841386    {
     
    14711473            if (pv)
    14721474            {
    1473                 PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb);
     1475                PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL);
    14741476                if (pMemLnx)
    14751477                {
     
    15241526    }
    15251527
    1526     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb);
     1528    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL);
    15271529    if (!pMemLnx)
    15281530    {
     
    15581560    if (!cbSub)
    15591561        cbSub = pMemLnxToMap->Core.cb - offSub;
    1560     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub);
     1562    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub, NULL);
    15611563    if (pMemLnx)
    15621564    {
     
    17321734    if (cbSub == 0)
    17331735        cbSub = pMemLnxToMap->Core.cb;
    1734     pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub);
     1736    pMemLnx = (PRTR0MEMOBJLNX)rtR0MemObjNew(sizeof(*pMemLnx), RTR0MEMOBJTYPE_MAPPING, NULL, cbSub, NULL);
    17351737    if (pMemLnx)
    17361738    {
  • trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp

    r91446 r91478  
    5555 * @param   pv          The memory object mapping.
    5656 * @param   cb          The size of the memory object.
    57  */
    58 DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb)
     57 * @param   pszTag      The tag string.
     58 */
     59DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb, const char *pszTag)
    5960{
    6061    PRTR0MEMOBJINTERNAL pNew;
     
    7980        pNew->cb        = cb;
    8081        pNew->pv        = pv;
     82#ifdef DEBUG
     83        pNew->pszTag    = pszTag;
     84#else
     85        RT_NOREF_PV(pszTag);
     86#endif
    8187    }
    8288    return pNew;
  • trunk/src/VBox/Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c

    r91446 r91478  
    233233DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    234234{
    235     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
    236                                                                        RTR0MEMOBJTYPE_PAGE, NULL, cb);
     235    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL);
    237236    if (!pMemNetBSD)
    238237        return VERR_NO_MEMORY;
     
    265264DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    266265{
    267     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
    268                                                                        RTR0MEMOBJTYPE_LOW, NULL, cb);
     266    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL);
    269267    if (!pMemNetBSD)
    270268        return VERR_NO_MEMORY;
     
    284282DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
    285283{
    286     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
    287                                                                        RTR0MEMOBJTYPE_CONT, NULL, cb);
     284    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL);
    288285    if (!pMemNetBSD)
    289286        return VERR_NO_MEMORY;
     
    309306
    310307    /* create the object. */
    311     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
    312                                                                        enmType, NULL, cb);
     308    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), enmType, NULL, cb, NULL);
    313309    if (!pMemNetBSD)
    314310        return VERR_NO_MEMORY;
     
    358354
    359355    /* create the object. */
    360     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     356    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    361357    if (!pMemNetBSD)
    362358        return VERR_NO_MEMORY;
     
    374370DECLHIDDEN(int) rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process)
    375371{
    376     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
     372    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL);
    377373    if (!pMemNetBSD)
    378374        return VERR_NO_MEMORY;
     
    398394{
    399395    /* Kernel memory (always?) wired; all memory allocated by vbox code is? */
    400     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, pv, cb);
     396    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    401397    if (!pMemNetBSD)
    402398        return VERR_NO_MEMORY;
     
    417413    }
    418414
    419     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb);
     415    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb, NULL);
    420416    if (!pMemNetBSD)
    421417        return VERR_NO_MEMORY;
     
    462458    size_t sz = cbSub > 0 ? cbSub : pMemNetBSD0->Core.cb;
    463459
    464     PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_MAPPING, NULL, sz);
     460    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_MAPPING, NULL, sz, NULL);
    465461
    466462    vaddr_t virt = uvm_km_alloc(kernel_map, sz, uAlignment,
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r91446 r91478  
    280280#endif
    281281
    282                         PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb);
     282                        PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, NULL);
    283283                        if (pMemNt)
    284284                        {
     
    330330             * Create the IPRT memory object.
    331331             */
    332             PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb);
     332            PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, NULL);
    333333            if (pMemNt)
    334334            {
     
    438438                         * Create the memory object.
    439439                         */
    440                         PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb);
     440                        PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PAGE, pv, cb, pszTag);
    441441                        if (pMemNt)
    442442                        {
     
    522522                    if (pv)
    523523                    {
    524                         PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_LOW, pv, cb);
     524                        PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_LOW, pv, cb, NULL);
    525525                        if (pMemNt)
    526526                        {
     
    603603#endif
    604604
    605         PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_CONT, pv, cb);
     605        PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_CONT, pv, cb, NULL);
    606606        if (pMemNt)
    607607        {
     
    663663                if (iPage >= cPages)
    664664                {
    665                     PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     665                    PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    666666                    if (pMemNt)
    667667                    {
     
    681681    }
    682682
    683     /** @todo
    684      * For large page allocations use MM_ALLOCATE_FAST_LARGE_PAGES ...
    685      * MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS
    686      */
    687 
    688683    return rtR0MemObjNativeAllocContEx(ppMem, cb, false, PhysHighest, uAlignment);
    689684}
     
    703698            if (MmGetMdlByteCount(pMdl) >= cb)
    704699            {
    705                 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb);
     700                PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb, NULL);
    706701                if (pMemNt)
    707702                {
     
    736731     * Create the IPRT memory object.
    737732     */
    738     PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     733    PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    739734    if (pMemNt)
    740735    {
     
    772767        return VERR_OUT_OF_RANGE;
    773768    PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJNT, apMdls[cMdls]),
    774                                                         RTR0MEMOBJTYPE_LOCK, pv, cb);
     769                                                        RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    775770    if (!pMemNt)
    776771        return VERR_NO_MEMORY;
     
    10071002                PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(  !offSub && !cbSub
    10081003                                                                    ? sizeof(*pMemNt) : RT_UOFFSETOF_DYN(RTR0MEMOBJNT, apMdls[1]),
    1009                                                                     RTR0MEMOBJTYPE_MAPPING, pv, pMemNtToMap->Core.cb);
     1004                                                                    RTR0MEMOBJTYPE_MAPPING, pv, pMemNtToMap->Core.cb, NULL);
    10101005                if (pMemNt)
    10111006                {
     
    10621057        {
    10631058            PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(sizeof(*pMemNt), RTR0MEMOBJTYPE_MAPPING, pv,
    1064                                                                 pMemNtToMap->Core.cb);
     1059                                                                pMemNtToMap->Core.cb, NULL);
    10651060            if (pMemNt)
    10661061            {
  • trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp

    r91446 r91478  
    143143    const ULONG cPages = cb >> PAGE_SHIFT;
    144144    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]),
    145                                                            RTR0MEMOBJTYPE_PAGE, NULL, cb);
     145                                                           RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL);
    146146    if (!pMemOs2)
    147147        return VERR_NO_MEMORY;
     
    180180    const ULONG cPages = cb >> PAGE_SHIFT;
    181181    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]),
    182                                                            RTR0MEMOBJTYPE_LOW, NULL, cb);
     182                                                           RTR0MEMOBJTYPE_LOW, NULL, cb, NULL);
    183183    if (!pMemOs2)
    184184        return VERR_NO_MEMORY;
     
    209209
    210210    /* create the object. */
    211     PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_CONT, NULL, cb);
     211    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_CONT, NULL, cb, NULL);
    212212    if (!pMemOs2)
    213213        return VERR_NO_MEMORY;
     
    237237
    238238    /* create the object. */
    239     PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     239    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    240240    if (!pMemOs2)
    241241        return VERR_NO_MEMORY;
     
    269269
    270270    /* create the object. */
    271     PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     271    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    272272    if (!pMemOs2)
    273273        return VERR_NO_MEMORY;
     
    290290    const ULONG cPages = cb >> PAGE_SHIFT;
    291291    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]),
    292                                                            RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
     292                                                           RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL);
    293293    if (!pMemOs2)
    294294        return VERR_NO_MEMORY;
     
    317317    const ULONG cPages = cb >> PAGE_SHIFT;
    318318    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJOS2, aPages[cPages]),
    319                                                            RTR0MEMOBJTYPE_LOCK, pv, cb);
     319                                                           RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    320320    if (!pMemOs2)
    321321        return VERR_NO_MEMORY;
     
    423423        cbSub = pMemToMapOs2->Core.cb - offSub;
    424424    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_MAPPING,
    425                                                            (uint8_t *)pvR0 + offSub, cbSub);
     425                                                           (uint8_t *)pvR0 + offSub, cbSub, NULL);
    426426    if (pMemOs2)
    427427    {
     
    513513     */
    514514    PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_MAPPING,
    515                                                            pvR3, pMemToMapOs2->Core.cb);
     515                                                           pvR3, pMemToMapOs2->Core.cb, NULL);
    516516    if (pMemOs2)
    517517    {
  • trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c

    r91446 r91478  
    653653{
    654654    /* Create the object. */
    655     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PAGE, NULL, cb);
     655    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PAGE, NULL, cb, NULL);
    656656    if (RT_UNLIKELY(!pMemSolaris))
    657657        return VERR_NO_MEMORY;
     
    683683
    684684    /* Create the object */
    685     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOW, NULL, cb);
     685    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOW, NULL, cb, NULL);
    686686    if (!pMemSolaris)
    687687        return VERR_NO_MEMORY;
     
    712712{
    713713#if HC_ARCH_BITS == 64
    714     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb);
     714    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb, NULL);
    715715    if (RT_UNLIKELY(!pMemSolaris))
    716716        return VERR_NO_MEMORY;
     
    769769    AssertMsgReturn(PhysHighest >= 16 *_1M, ("PhysHigest=%RHp\n", PhysHighest), VERR_NOT_SUPPORTED);
    770770
    771     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     771    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    772772    if (RT_UNLIKELY(!pMemSolaris))
    773773        return VERR_NO_MEMORY;
     
    841841
    842842    /* Create the object. */
    843     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb);
     843    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb, NULL);
    844844    if (!pMemSolaris)
    845845        return VERR_NO_MEMORY;
     
    861861
    862862    /* Create the locking object */
    863     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
     863    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb, NULL);
    864864    if (!pMemSolaris)
    865865        return VERR_NO_MEMORY;
     
    892892    NOREF(fAccess);
    893893
    894     PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, pv, cb);
     894    PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, pv, cb, NULL);
    895895    if (!pMemSolaris)
    896896        return VERR_NO_MEMORY;
     
    932932
    933933    /* Create the object. */
    934     pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb);
     934    pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb, NULL);
    935935    if (!pMemSolaris)
    936936    {
     
    10021002         * Create a memory object for the mapping.
    10031003         */
    1004         PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pv, cbSub);
     1004        PRTR0MEMOBJSOL pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pv, cbSub, NULL);
    10051005        if (pMemSolaris)
    10061006        {
     
    10461046     */
    10471047    PRTR0MEMOBJSOL pMemSolaris;
    1048     pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pb, cb);
     1048    pMemSolaris = (PRTR0MEMOBJSOL)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pb, cb, NULL);
    10491049    if (RT_UNLIKELY(!pMemSolaris))
    10501050        return VERR_NO_MEMORY;
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