VirtualBox

Ignore:
Timestamp:
Feb 26, 2010 3:39:29 PM (15 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/memobj-linux: alignment for rtR0MemObjNativeAllocPhys()

File:
1 edited

Legend:

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

    r26847 r26864  
    702702int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment)
    703703{
    704     /** @todo alignment */
    705     if (uAlignment != PAGE_SIZE)
     704    /*
     705     * Contiguous physical memory: Check for the alignment of the physical address.
     706     * Use the knowledge that we are using alloc_pages(flags, order) for allocating
     707     * contiguous physical memory which is always aligned at 2^(PAGE_SHIFT+order).
     708     */
     709    if (uAlignment > cb)
    706710        return VERR_NOT_SUPPORTED;
    707711
     
    712716int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
    713717{
     718    /*
     719     * Non-contiguous memory.
     720     */
    714721    return rtR0MemObjLinuxAllocPhysSub(ppMem, RTR0MEMOBJTYPE_PHYS_NC, cb, PhysHighest);
    715722}
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