VirtualBox

Changeset 18429 in vbox


Ignore:
Timestamp:
Mar 28, 2009 1:58:11 AM (16 years ago)
Author:
vboxsync
Message:

MMHyper: Fixed bug (+warning) in mmR3HyperHeapCreate where the unaligned size was used instead of the aligned when calculating the number of pages in the heap. Just a theoretical issue since cb is always aligned. Main point is fixing the warning. :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/MMHyper.cpp

    r18354 r18429  
    723723    const uint32_t  cbAligned = RT_ALIGN_32(cb, PAGE_SIZE);
    724724    AssertReturn(cbAligned >= cb, VERR_INVALID_PARAMETER);
    725     uint32_t const  cPages = cb >> PAGE_SHIFT;
     725    uint32_t const  cPages = cbAligned >> PAGE_SHIFT;
    726726    PSUPPAGE        paPages = (PSUPPAGE)MMR3HeapAlloc(pVM, MM_TAG_MM, cPages * sizeof(paPages[0]));
    727727    if (!paPages)
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