Changeset 1606 for trunk/psLib/src/sysUtils/psMemory.h
- Timestamp:
- Aug 23, 2004, 12:36:04 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psMemory.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psMemory.h
r1448 r1606 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 10 01:55:34$14 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-23 22:36:03 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 135 135 ); 136 136 137 void p_psMemSetDeallocator(void *ptr, psFreeFcn freeFcn);138 psFreeFcn p_psMemGetDeallocator(void *ptr);139 140 137 /// Memory allocation. psAlloc sends file and line number to p_psAlloc. 141 138 #define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__) 142 139 #endif 140 141 /** Set the deallocator routine 142 * 143 * A deallocator routine can optionally be assigned to a memory block to 144 * ensure that associated memory blocks also get freed, e.g., memory buffers 145 * referenced within a struct. 146 * 147 */ 148 void p_psMemSetDeallocator( 149 void *ptr, ///< the memory block to operate on 150 psFreeFcn freeFcn ///< the function to be executed at deallocation 151 ); 152 153 /** Get the deallocator routine 154 * 155 * This function returns the deallocator for a memory block. A deallocator 156 * routine can optionally be assigned to a memory block to ensure that 157 * associated memory blocks also get freed, e.g., memory buffers referenced 158 * within a struct. 159 * 160 * @return psFreeFcn the routine to be called at deallocation. 161 */ 162 psFreeFcn p_psMemGetDeallocator( 163 void *ptr ///< the memory block 164 ); 143 165 144 166 /** Memory re-allocation. This operates much like realloc(), but is guaranteed to return a non-NULL value.
Note:
See TracChangeset
for help on using the changeset viewer.
