VirtualBox

Changeset 100308 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jun 28, 2023 10:24:38 AM (19 months ago)
Author:
vboxsync
Message:

Runtime: Replace occurence of PAGE_SIZE with RTSystemgetPageSize() in code used by linux.arm64 guest additions, bugref:10476

Location:
trunk/src/VBox/Runtime/common
Files:
4 edited

Legend:

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

    r98103 r100308  
    380380     * Validate input. The imposed minimum heap size is just a convenient value.
    381381     */
    382     AssertReturn(cbMemory >= PAGE_SIZE, VERR_INVALID_PARAMETER);
     382    AssertReturn(cbMemory >= _4K, VERR_INVALID_PARAMETER);
    383383    AssertReturn(cbMemory < UINT32_MAX, VERR_INVALID_PARAMETER);
    384384    AssertPtrReturn(pvMemory, VERR_INVALID_POINTER);
  • trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp

    r98103 r100308  
    297297     * Validate input. The imposed minimum heap size is just a convenient value.
    298298     */
    299     AssertReturn(cbMemory >= PAGE_SIZE, VERR_INVALID_PARAMETER);
     299    AssertReturn(cbMemory >= _4K, VERR_INVALID_PARAMETER);
    300300    AssertPtrReturn(pvMemory, VERR_INVALID_POINTER);
    301301    AssertReturn((uintptr_t)pvMemory + (cbMemory - 1) > (uintptr_t)cbMemory, VERR_INVALID_PARAMETER);
  • trunk/src/VBox/Runtime/common/misc/handletablectx.cpp

    r98103 r100308  
    4949#include <iprt/string.h>
    5050#include <iprt/asm.h>
     51#include <iprt/system.h>
    5152#include "internal/magics.h"
    5253#include "handletable.h"
     
    118119            uint32_t const  iLevel1 = pThis->cCur / RTHT_LEVEL2_ENTRIES;
    119120            uint32_t        cLevel1 = iLevel1 >= pThis->cLevel1
    120                                     ? pThis->cLevel1 + PAGE_SIZE / sizeof(void *)
     121                                    ? pThis->cLevel1 + RTSystemGetPageSize() / sizeof(void *)
    121122                                    : 0;
    122123            if (cLevel1 > pThis->cMax / RTHT_LEVEL2_ENTRIES)
  • trunk/src/VBox/Runtime/common/misc/handletablesimple.cpp

    r98103 r100308  
    4949#include <iprt/string.h>
    5050#include <iprt/asm.h>
     51#include <iprt/system.h>
    5152#include "internal/magics.h"
    5253#include "handletable.h"
     
    110111            uint32_t const iLevel1 = pThis->cCur / RTHT_LEVEL2_ENTRIES;
    111112            uint32_t cLevel1 = iLevel1 >= pThis->cLevel1
    112                              ? pThis->cLevel1 + PAGE_SIZE / sizeof(void *)
     113                             ? pThis->cLevel1 + RTSystemGetPageSize() / sizeof(void *)
    113114                             : 0;
    114115            if (cLevel1 > pThis->cMax / RTHT_LEVEL2_ENTRIES)
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