VirtualBox

Changeset 99007 in vbox


Ignore:
Timestamp:
Mar 16, 2023 2:13:51 PM (21 months ago)
Author:
vboxsync
Message:

Runtime/testcase/tstRTMemCache: Fix alignment and object count mixup when creatin the memory cache causing an error on archotectures with a 16KiB page size, bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTMemCache.cpp

    r98103 r99007  
    8989    uint32_t const cObjects = PAGE_SIZE * 2 / 256;
    9090    RTMEMCACHE hMemCache;
    91     RTTESTI_CHECK_RC_RETV(RTMemCacheCreate(&hMemCache, 256, cObjects, 32, NULL, NULL, NULL, 0 /*fFlags*/), VINF_SUCCESS);
     91    RTTESTI_CHECK_RC_RETV(RTMemCacheCreate(&hMemCache, 256, 32 /*cbAlignment*/, cObjects, NULL, NULL, NULL, 0 /*fFlags*/), VINF_SUCCESS);
    9292    RTTESTI_CHECK_RETV(hMemCache != NIL_RTMEMCACHE);
    9393
     
    172172    bool            fFail    = false;
    173173    uint32_t const  cObjects = PAGE_SIZE * 2 / 256;
    174     RTTESTI_CHECK_RC_RETV(RTMemCacheCreate(&g_hMemCache, 256, cObjects, 32, tst2Ctor, tst2Dtor, &fFail, 0 /*fFlags*/), VINF_SUCCESS);
     174    RTTESTI_CHECK_RC_RETV(RTMemCacheCreate(&g_hMemCache, 256, 32 /*cbAlignemnt*/, cObjects, tst2Ctor, tst2Dtor, &fFail, 0 /*fFlags*/), VINF_SUCCESS);
    175175
    176176    /* A failure run first. */
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