VirtualBox

Changeset 5325 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Oct 16, 2007 11:53:19 AM (17 years ago)
Author:
vboxsync
Message:

use segkmem_alloc on 64-bit solaris because of gcc and its kernel code model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c

    r4543 r5325  
    3636    Assert(cb != sizeof(void *));
    3737    PRTMEMHDR pHdr;
     38#ifdef RT_ARCH_AMD64
     39    if (fFlags & RTMEMHDR_FLAG_EXEC)
     40        pHdr = (PRTMEMHDR)segkmem_alloc(heaptext_arena, cb + sizeof(*pHdr), KM_SLEEP);
     41    else
     42#endif
    3843    if (fFlags & RTMEMHDR_FLAG_ZEROED)
    3944        pHdr = (PRTMEMHDR)kmem_zalloc(cb + sizeof(*pHdr), KM_SLEEP);
     
    5964{
    6065    pHdr->u32Magic += 1;
    61     kmem_free(pHdr, pHdr->cb + sizeof(*pHdr));
     66#ifdef RT_ARCH_AMD64
     67    if (pHdr->fFlags & RTMEMHDR_FLAG_EXEC)
     68        segkmem_free(heaptext_arena, pHdr, pHdr->cb + sizeof(*pHdr));
     69    else
     70#endif
     71        kmem_free(pHdr, pHdr->cb + sizeof(*pHdr));
    6272}
    6373
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