Changeset 10276 for trunk/psLib/src/sys/psMemory.c
- Timestamp:
- Nov 29, 2006, 7:58:21 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psMemory.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psMemory.c
r9538 r10276 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.8 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-1 0-13 21:13:48$10 * @version $Revision: 1.87 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-11-29 17:58:21 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 182 182 } 183 183 184 185 /* 186 * A callback function to check the state of the memory system; may be registered 187 * with psMem{Alloc,Free}CallbackSet 188 */ 189 static psMemId memAllocCallbackCheckCorruption(const psMemBlock *ptr) 190 { 191 static psMemId incr = 10; // "p_psMemAllocID += incr" 192 bool abort_on_error = false; 193 194 if (psMemCheckCorruption(abort_on_error) > 0) { 195 fprintf(stderr,"Detected memory corruption\n"); // somewhere to set a breakpoint 196 } 197 198 return incr; 199 } 200 184 201 /* 185 202 * The default callbacks … … 227 244 { 228 245 psMemId old = p_psMemAllocID; 246 247 /* 248 * This is here purely to stop gcc complaining 249 */ 250 assert (memAllocCallbackCheckCorruption != NULL); 229 251 230 252 p_psMemAllocID = id;
Note:
See TracChangeset
for help on using the changeset viewer.
