Changeset 10909
- Timestamp:
- Jan 4, 2007, 3:58:58 PM (19 years ago)
- File:
-
- 1 edited
-
branches/jch-memory/psLib/src/sys/psMemory.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jch-memory/psLib/src/sys/psMemory.c
r10908 r10909 9 9 * @author Joshua Hoblitt, University of Hawaii 10 10 * 11 * @version $Revision: 1.88.2.1 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-01-05 01:58: 01$11 * @version $Revision: 1.88.2.17 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-01-05 01:58:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 73 73 74 74 #define HANDLE_BAD_BLOCK(memBlock, file, lineo, func) \ 75 if ( badMemBlock(stderr, memBlock, file, lineo, func)) { \75 if (isBadMemBlock(stderr, memBlock, file, lineo, func)) { \ 76 76 PS_MEM_ABORT(__func__, "Unsafe to Continue\n"); \ 77 77 } 78 78 79 static bool badMemBlock(FILE *output, const psMemBlock *memBlock, const char *file, unsigned int lineo, const char *func);79 static bool isBadMemBlock(FILE *output, const psMemBlock *memBlock, const char *file, unsigned int lineo, const char *func); 80 80 81 81 // pointer to the last mem block that was allocated … … 148 148 * N.b. If the block wasn't allocated by psAlloc, it will appear corrupted 149 149 */ 150 static bool badMemBlock(FILE *output, const psMemBlock *memBlock, const char *file, unsigned int lineno, const char *func)150 static bool isBadMemBlock(FILE *output, const psMemBlock *memBlock, const char *file, unsigned int lineno, const char *func) 151 151 { 152 152 // n.b. since this is called by psMemCheckCorruption while the memblock … … 360 360 psS32 nbad = 0; // number of bad blocks 361 361 for (psMemBlock *memBlock = lastMemBlockAllocated; memBlock != NULL; memBlock = memBlock->nextBlock) { 362 if ( badMemBlock(output, memBlock, __FILE__, __LINE__, __func__)) {362 if (isBadMemBlock(output, memBlock, __FILE__, __LINE__, __func__)) { 363 363 nbad++; 364 364 … … 652 652 ptr = ((psMemBlock* ) vptr) - 1; 653 653 654 if ( badMemBlock(ptr, __func__)) {654 if (isBadMemBlock(ptr, __func__)) { 655 655 (void)p_psMemDecrRefCounter(vptr, filename, lineno); 656 656 memProblemCallback(ptr, file, lineno);
Note:
See TracChangeset
for help on using the changeset viewer.
