VirtualBox

Changeset 21872 in vbox


Ignore:
Timestamp:
Jul 30, 2009 9:30:56 AM (15 years ago)
Author:
vboxsync
Message:

RTMemPageAlloc[Z]/win: _aligned_malloc wants an aligned size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/alloc-win.cpp

    r11020 r21872  
    111111    void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE);
    112112#else
    113     void *pv = _aligned_malloc(cb, PAGE_SIZE);
     113    void *pv = _aligned_malloc(RT_ALIGN_Z(cb, PAGE_SIZE), PAGE_SIZE);
    114114#endif
    115115    AssertMsg(pv, ("cb=%d lasterr=%d\n", cb, GetLastError()));
     
    130130    void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE);
    131131#else
    132     void *pv = _aligned_malloc(cb, PAGE_SIZE);
     132    void *pv = _aligned_malloc(RT_ALIGN_Z(cb, PAGE_SIZE), PAGE_SIZE);
    133133#endif
    134134    if (pv)
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