VirtualBox

Changeset 20866 in vbox


Ignore:
Timestamp:
Jun 23, 2009 7:33:23 PM (15 years ago)
Author:
vboxsync
Message:

SUP: Removed two obsolete allocation APIs.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r20864 r20866  
    701701 * Use SUPR3PageFreeEx() to free memory allocated with this function.
    702702 *
    703  * This SUPR3PageAllocEx and SUPR3PageFreeEx replaces SUPR3PageAllocLockedEx,
    704  * SUPR3PageFreeLocked, SUPR3PageAlloc, and SUPR3PageFree.
    705  *
    706703 * @returns VBox status code.
    707704 * @param   cPages          The number of pages to allocate.
     
    759756 */
    760757SUPR3DECL(int) SUPR3PageFreeEx(void *pvPages, size_t cPages);
    761 
    762 /**
    763  * Allocate non-zeroed locked pages.
    764  *
    765  * @returns VBox status code.
    766  * @param   cPages          Number of pages to allocate.
    767  * @param   ppvPages        Where to store the base pointer to the allocated pages.
    768  * @param   paPages         Where to store the physical page addresses returned.
    769  *                          On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
    770  *                          NULL is allowed.
    771  * @todo remove this.
    772  */
    773 SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages);
    774 
    775 /**
    776  * Frees locked pages allocated with SUPPageAllocLockedEx().
    777  *
    778  * @returns VBox status.
    779  * @param   pvPages         Pointer returned by SUPR3PageAllocLockedEx().
    780  * @param   cPages          Number of pages that was allocated.
    781  * @todo remove this.
    782  */
    783 SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages);
    784758
    785759/**
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r20864 r20866  
    968968
    969969
    970 SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages)
    971 {
    972     return SUPR3PageAllocEx(cPages, 0 /*fFlags*/, ppvPages, NULL /*pR0Ptr*/, paPages);
    973 }
    974 
    975 
    976 SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages)
    977 {
    978     /*
    979      * Validate.
    980      */
    981     AssertPtrReturn(pvPages, VERR_INVALID_POINTER);
    982     AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE);
    983 
    984     /*
    985      * Check if we're employing the fallback or not to avoid the
    986      * fuzzy handling of this in SUPR3PageFreeEx.
    987      */
    988     int rc;
    989     if (g_fSupportsPageAllocNoKernel)
    990         rc = SUPR3PageFreeEx(pvPages, cPages);
    991     else
    992     {
    993         /* fallback */
    994         rc = supR3PageUnlock(pvPages);
    995         if (RT_SUCCESS(rc))
    996             rc = suplibOsPageFree(&g_supLibData, pvPages, cPages);
    997     }
    998     return rc;
    999 }
    1000 
    1001 
    1002970/**
    1003  * Fallback for SUPR3PageAllocLockedEx on systems where RTR0MemObjPhysAllocNC
    1004  * isn't supported.
     971 * Fallback for SUPR3PageAllocEx on systems where RTR0MemObjPhysAllocNC isn't
     972 * supported.
    1005973 */
    1006974static int supPagePageAllocNoKernelFallback(size_t cPages, void **ppvPages, PSUPPAGE paPages)
  • trunk/src/VBox/VMM/MMInternal.h

    r20864 r20866  
    527527    /** Flag indicating the allocation method.
    528528     * Set: SUPR3LowAlloc().
    529      * Clear: SUPR3PageAllocLockedEx(). */
     529     * Clear: SUPR3PageAllocEx(). */
    530530    bool                                fLow;
    531531    /** Number of subpools. */
  • trunk/src/VBox/VMM/MMPagePool.cpp

    r20864 r20866  
    6868     *        ring-0. Need to change the wasy we allocate it... */
    6969    AssertReleaseReturn(sizeof(*pVM->mm.s.pPagePoolR3) + sizeof(*pVM->mm.s.pPagePoolLowR3) < PAGE_SIZE, VERR_INTERNAL_ERROR);
    70     int rc = SUPR3PageAllocLockedEx(1, (void **)&pVM->mm.s.pPagePoolR3, NULL);
     70    int rc = SUPR3PageAllocEx(1, 0 /*fFlags*/, (void **)&pVM->mm.s.pPagePoolR3, NULL /*pR0Ptr*/, NULL /*paPages*/);
    7171    if (RT_FAILURE(rc))
    7272        return rc;
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