VirtualBox

Ignore:
Timestamp:
Feb 15, 2010 3:33:33 AM (15 years ago)
Author:
vboxsync
Message:

Runtime: win.amd64 warnings.

Location:
trunk/src/VBox/Runtime/common/alloc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/alloc/heapoffset.cpp

    r26344 r26525  
    375375     */
    376376    AssertReturn(cbMemory >= PAGE_SIZE, VERR_INVALID_PARAMETER);
     377    AssertReturn(cbMemory < UINT32_MAX, VERR_INVALID_PARAMETER);
    377378    AssertPtrReturn(pvMemory, VERR_INVALID_POINTER);
    378379    AssertReturn((uintptr_t)pvMemory + (cbMemory - 1) > (uintptr_t)cbMemory, VERR_INVALID_PARAMETER);
     
    394395    /* Init the heap anchor block. */
    395396    pHeapInt->u32Magic = RTHEAPOFFSET_MAGIC;
    396     pHeapInt->cbHeap = cbMemory;
    397     pHeapInt->cbFree = cbMemory
     397    pHeapInt->cbHeap = (uint32_t)cbMemory;
     398    pHeapInt->cbFree = (uint32_t)cbMemory
    398399                     - sizeof(RTHEAPOFFSETBLOCK)
    399400                     - sizeof(RTHEAPOFFSETINTERNAL);
  • trunk/src/VBox/Runtime/common/alloc/memcache.cpp

    r26452 r26525  
    167167    if (cbAlignment == 0)
    168168    {
    169         cbAlignment = UINT32_C(1) << ASMBitLastSetU32((uint32_t)cbObject);
     169        cbAlignment = (size_t)1 << ASMBitLastSetU32((uint32_t)cbObject);
    170170        if (cbAlignment > 64)
    171171            cbAlignment = 64;
     
    191191
    192192    pThis->u32Magic         = RTMEMCACHE_MAGIC;
    193     pThis->cbObject         = RT_ALIGN_Z(cbObject, cbAlignment);
    194     pThis->cbAlignment      = cbAlignment;
    195     pThis->cPerPage         = (PAGE_SIZE - RT_ALIGN_Z(sizeof(RTMEMCACHEPAGE), cbAlignment)) / pThis->cbObject;
     193    pThis->cbObject         = (uint32_t)RT_ALIGN_Z(cbObject, cbAlignment);
     194    pThis->cbAlignment      = (uint32_t)cbAlignment;
     195    pThis->cPerPage         = (uint32_t)((PAGE_SIZE - RT_ALIGN_Z(sizeof(RTMEMCACHEPAGE), cbAlignment)) / pThis->cbObject);
    196196    while (    RT_ALIGN_Z(sizeof(RTMEMCACHEPAGE), RT_MIN(cbAlignment, 8))
    197197             + pThis->cPerPage * pThis->cbObject
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