Changeset 31157 in vbox for trunk/src/VBox/Runtime/r3/darwin
- Timestamp:
- Jul 28, 2010 3:15:35 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64135
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/darwin/alloc-darwin.cpp
r28800 r31157 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 40 40 41 41 42 /** 43 * Allocates memory which may contain code. 44 * 45 * @returns Pointer to the allocated memory. 46 * @returns NULL on failure. 47 * @param cb Size in bytes of the memory block to allocate. 48 */ 49 RTDECL(void *) RTMemExecAlloc(size_t cb) RT_NO_THROW 42 RTDECL(void *) RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW 50 43 { 51 44 /* … … 74 67 75 68 76 /**77 * Free executable/read/write memory allocated by RTMemExecAlloc().78 *79 * @param pv Pointer to memory block.80 */81 69 RTDECL(void) RTMemExecFree(void *pv) RT_NO_THROW 82 70 { … … 86 74 87 75 88 /** 89 * Allocate page aligned memory. 90 * 91 * @returns Pointer to the allocated memory. 92 * @returns NULL if we're out of memory. 93 * @param cb Size of the memory block. Will be rounded up to page size. 94 */ 95 RTDECL(void *) RTMemPageAlloc(size_t cb) RT_NO_THROW 76 RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW 96 77 { 97 78 return valloc(RT_ALIGN_Z(cb, PAGE_SIZE)); … … 99 80 100 81 101 /** 102 * Allocate zero'ed page aligned memory. 103 * 104 * @returns Pointer to the allocated memory. 105 * @returns NULL if we're out of memory. 106 * @param cb Size of the memory block. Will be rounded up to page size. 107 */ 108 RTDECL(void *) RTMemPageAllocZ(size_t cb) RT_NO_THROW 82 RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW 109 83 { 110 84 cb = RT_ALIGN_Z(cb, PAGE_SIZE); … … 116 90 117 91 118 /**119 * Free a memory block allocated with RTMemPageAlloc() or RTMemPageAllocZ().120 *121 * @param pv Pointer to the block as it was returned by the allocation function.122 * NULL will be ignored.123 */124 92 RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW 125 93 { … … 129 97 130 98 131 /**132 * Change the page level protection of a memory region.133 *134 * @returns iprt status code.135 * @param pv Start of the region. Will be rounded down to nearest page boundary.136 * @param cb Size of the region. Will be rounded up to the nearest page boundary.137 * @param fProtect The new protection, a combination of the RTMEM_PROT_* defines.138 */139 99 RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW 140 100 {
Note:
See TracChangeset
for help on using the changeset viewer.