VirtualBox

Changeset 104110 in vbox


Ignore:
Timestamp:
Mar 28, 2024 10:26:33 PM (10 months ago)
Author:
vboxsync
Message:

VMM/IEM: Removed incorrect cbReq alignment in iemExecMemAllocatorAlloc. The iemExecMemAllocatorAllocInChunk suballocator function does the correct alignment and takes the header into account. bugref:10370

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r104109 r104110  
    509509    STAM_PROFILE_START(&pExecMemAllocator->StatAlloc, a);
    510510
    511     /*
    512      * Adjust the request size so it'll accomodate a header, the aligned it
    513      * up to a whole unit size.
    514      */
    515 /** @todo this aint right wrt header. See iemExecMemAllocatorAllocInChunk   */
    516     cbReq = RT_ALIGN_32(cbReq, IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SIZE);
    517511    for (unsigned iIteration = 0;; iIteration++)
    518512    {
     
    563557         */
    564558        if (iIteration == 0)
    565             iemTbAllocatorFreeupNativeSpace(pVCpu, cbReq / sizeof(IEMNATIVEINSTR));
     559        {
     560            /* No header included in the instruction count here. */
     561            uint32_t const cNeededInstrs = RT_ALIGN_32(cbReq, IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SIZE) / sizeof(IEMNATIVEINSTR));
     562            iemTbAllocatorFreeupNativeSpace(pVCpu, cNeededInstrs);
     563        }
    566564        else
    567565        {
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