VirtualBox

Changeset 41069 in vbox


Ignore:
Timestamp:
Apr 26, 2012 12:01:00 PM (12 years ago)
Author:
vboxsync
Message:

GMMR0,memobj-r0drv-darwin.cpp: Moved the allocate fudge factor from GMMR0 to the darwin code. Mystery still unsolved, thought to be related to various panics as well.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r41060 r41069  
    426426     * The kIOMemoryKernelUserShared flag just forces the result to be page aligned.
    427427     */
     428#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. */
     429    size_t const cbFudged = cb + PAGE_SIZE;
     430#else
     431    size_t const cbFudged = cb;
     432#endif
    428433    int rc;
    429434    IOBufferMemoryDescriptor *pMemDesc =
     
    432437                                                         | kIODirectionInOut
    433438                                                         | (fContiguous ? kIOMemoryPhysicallyContiguous : 0),
    434                                                          cb,
     439                                                         cbFudged,
    435440                                                         PhysMask);
    436441    if (pMemDesc)
     
    439444        if (IORet == kIOReturnSuccess)
    440445        {
    441             void *pv = pMemDesc->getBytesNoCopy(0, cb);
     446            void *pv = pMemDesc->getBytesNoCopy(0, cbFudged);
    442447            if (pv)
    443448            {
  • trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp

    r40806 r41069  
    821821                        const uint32_t  cbVM   = RT_UOFFSETOF(VM, aCpus[cCpus]);
    822822                        const uint32_t  cPages = RT_ALIGN_32(cbVM, PAGE_SIZE) >> PAGE_SHIFT;
    823 #ifdef RT_OS_DARWIN /** @todo Figure out why this is broken. Is it only on snow leopard? */
    824                         rc = RTR0MemObjAllocLow(&pGVM->gvmm.s.VMMemObj, (cPages + 1) << PAGE_SHIFT, false /* fExecutable */);
    825 #else
    826823                        rc = RTR0MemObjAllocLow(&pGVM->gvmm.s.VMMemObj, cPages << PAGE_SHIFT, false /* fExecutable */);
    827 #endif
    828824                        if (RT_SUCCESS(rc))
    829825                        {
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