VirtualBox

Changeset 82877 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 27, 2020 1:52:44 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/memobj-r0drv-darwin.cpp: Only apply the cb += PAGE_SIZE allocation fudging to snow leopard and earlier as it is not at all ideal when we allocate guest memory thru this code. bugref:9627

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r82868 r82877  
    463463                                       RTR0MEMOBJTYPE enmType, size_t uAlignment)
    464464{
    465     RT_NOREF_PV(uAlignment);
    466465    int rc;
    467466
     
    475474     * The kIOMemoryMapperNone flag is required since 10.8.2 (IOMMU changes?).
    476475     */
     476
     477    /* This is an old fudge from the snow leoard days: "Is it only on snow leopard?
     478       Seen allocating memory for the VM structure, last page corrupted or
     479       inaccessible."  Made it only apply to snow leopard and older for now. */
    477480    size_t cbFudged = cb;
    478     if (1) /** @todo Figure out why this is broken. Is it only on snow leopard? Seen allocating memory for the VM structure, last page corrupted or inaccessible. */
     481    if (version_major >= 11 /* 10 = 10.7.x = Lion. */)
     482    { /* likely */ }
     483    else
    479484         cbFudged += PAGE_SIZE;
    480 
    481     uint64_t uAlignmentActual = uAlignment;
    482485
    483486    IOOptionBits fOptions = kIOMemoryKernelUserShared | kIODirectionInOut;
     
    490493       versions 10.5.0 up to 10.7.0 it was private, and 10.4.8-10.5.0 it was
    491494       x86 only and didn't have the alignment parameter (slot was different too). */
     495    uint64_t uAlignmentActual = uAlignment;
    492496    IOBufferMemoryDescriptor *pMemDesc;
    493497#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
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