VirtualBox

Changeset 104876 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jun 10, 2024 1:50:35 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163476
Message:

VMM/IEM: Optimize executable memory allocation on macOS by removing the need for calling RTMemProtect() to switch between RW and RX memory. [build fixes] ?bugref:10555

File:
1 edited

Legend:

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

    r104858 r104876  
    459459 * Try allocate a block of @a cReqUnits in the chunk @a idxChunk.
    460460 */
    461 static void *iemExecMemAllocatorAllocInChunkInt(PIEMEXECMEMALLOCATOR pExecMemAllocator, uint64_t *pbmAlloc, uint32_t idxFirst,
    462                                                 uint32_t cToScan, uint32_t cReqUnits, uint32_t idxChunk, PIEMTB pTb, void **ppvExec)
     461static void *
     462iemExecMemAllocatorAllocInChunkInt(PIEMEXECMEMALLOCATOR pExecMemAllocator, uint64_t *pbmAlloc, uint32_t idxFirst,
     463                                   uint32_t cToScan, uint32_t cReqUnits, uint32_t idxChunk, PIEMTB pTb, void **ppvExec)
    463464{
    464465    /*
     
    529530
    530531static void *
    531 iemExecMemAllocatorAllocInChunk(PIEMEXECMEMALLOCATOR pExecMemAllocator, uint32_t idxChunk, uint32_t cbReq, PIEMTB pTb, void **ppvExec)
     532iemExecMemAllocatorAllocInChunk(PIEMEXECMEMALLOCATOR pExecMemAllocator, uint32_t idxChunk, uint32_t cbReq, PIEMTB pTb,
     533                                void **ppvExec)
    532534{
    533535    /*
     
    812814    unsigned const cbNeeded         = sizeof(IMAGE_RUNTIME_FUNCTION_ENTRY) * cFunctionEntries + cbUnwindInfo;
    813815    PIMAGE_RUNTIME_FUNCTION_ENTRY const paFunctions
    814         = (PIMAGE_RUNTIME_FUNCTION_ENTRY)iemExecMemAllocatorAllocInChunk(pExecMemAllocator, idxChunk, cbNeeded, NULL);
     816        = (PIMAGE_RUNTIME_FUNCTION_ENTRY)iemExecMemAllocatorAllocInChunk(pExecMemAllocator, idxChunk, cbNeeded, NULL, NULL);
    815817    AssertReturn(paFunctions, VERR_INTERNAL_ERROR_5);
    816818    pExecMemAllocator->aChunks[idxChunk].pvUnwindInfo = paFunctions;
     
    10481050     */
    10491051    GDBJITSYMFILE * const pSymFile = (GDBJITSYMFILE *)iemExecMemAllocatorAllocInChunk(pExecMemAllocator, idxChunk,
    1050                                                                                       sizeof(GDBJITSYMFILE), NULL);
     1052                                                                                      sizeof(GDBJITSYMFILE), NULL, NULL);
    10511053    AssertReturn(pSymFile, VERR_INTERNAL_ERROR_5);
    10521054    unsigned const offSymFileInChunk = (uintptr_t)pSymFile - (uintptr_t)pvChunk;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette