VirtualBox

Changeset 26435 in vbox


Ignore:
Timestamp:
Feb 11, 2010 2:43:19 PM (15 years ago)
Author:
vboxsync
Message:

Disallow non-paged alignment allocation in RTR0MemObjAllocPhysEx for 32 bits hosts.

File:
1 edited

Legend:

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

    r26432 r26435  
    607607    AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
    608608    AssertReturn(PhysHighest >= cb, VERR_INVALID_PARAMETER);
     609#if HC_ARCH_BITS == 32
     610    /* Memory allocate in this way is typically mapped into kernel space as well; simply don't allow this
     611     * on 32 bits hosts as the kernel space is too crowded already.
     612     */
     613    if (    uAlignment != 0
     614        &&  uAlignment != PAGE_SIZE)
     615        return VERR_NOT_SUPPORTED;
     616#else
    609617    AssertReturn((    uAlignment == 0
    610618                  ||  uAlignment == PAGE_SIZE
     
    612620                  ||  uAlignment == _4M
    613621                  ||  uAlignment == _1G), VERR_INVALID_PARAMETER);
     622#endif
    614623    RT_ASSERT_PREEMPTIBLE();
    615624
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