VirtualBox

Ignore:
Timestamp:
Jul 28, 2010 3:24:30 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64136
Message:

iprt,++: Tag allocation in all builds with a string, defaulting to FILE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/solaris/alloc-solaris.cpp

    r29277 r31158  
    11/* $Id$ */
    22/** @file
    3  * IPRT - Memory Allocation, POSIX.
     3 * IPRT - Memory Allocation, Solaris.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4949
    5050
    51 /**
    52  * Allocates memory which may contain code.
    53  *
    54  * @returns Pointer to the allocated memory.
    55  * @returns NULL on failure.
    56  * @param   cb      Size in bytes of the memory block to allocate.
    57  */
    58 RTDECL(void *) RTMemExecAlloc(size_t cb) RT_NO_THROW
     51RTDECL(void *) RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    5952{
    6053    /*
     
    8982
    9083
    91 /**
    92  * Free executable/read/write memory allocated by RTMemExecAlloc().
    93  *
    94  * @param   pv      Pointer to memory block.
    95  */
    9684RTDECL(void)    RTMemExecFree(void *pv) RT_NO_THROW
    9785{
     
    10189
    10290
    103 /**
    104  * Allocate page aligned memory.
    105  *
    106  * @returns Pointer to the allocated memory.
    107  * @returns NULL if we're out of memory.
    108  * @param   cb  Size of the memory block. Will be rounded up to page size.
    109  */
    110 RTDECL(void *) RTMemPageAlloc(size_t cb) RT_NO_THROW
     91RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    11192{
    11293#ifdef RT_USE_MMAP_PAGE
     
    122103
    123104
    124 /**
    125  * Allocate zero'ed page aligned memory.
    126  *
    127  * @returns Pointer to the allocated memory.
    128  * @returns NULL if we're out of memory.
    129  * @param   cb  Size of the memory block. Will be rounded up to page size.
    130  */
    131 RTDECL(void *) RTMemPageAllocZ(size_t cb) RT_NO_THROW
     105RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW
    132106{
    133107#ifdef RT_USE_MMAP_PAGE
     
    147121
    148122
    149 /**
    150  * Free a memory block allocated with RTMemPageAlloc() or RTMemPageAllocZ().
    151  *
    152  * @param   pv      Pointer to the block as it was returned by the allocation function.
    153  *                  NULL will be ignored.
    154  */
    155123RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW
    156124{
     
    168136
    169137
    170 /**
    171  * Change the page level protection of a memory region.
    172  *
    173  * @returns iprt status code.
    174  * @param   pv          Start of the region. Will be rounded down to nearest page boundary.
    175  * @param   cb          Size of the region. Will be rounded up to the nearest page boundary.
    176  * @param   fProtect    The new protection, a combination of the RTMEM_PROT_* defines.
    177  */
    178138RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW
    179139{
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