Changeset 10901 for branches/jch-memory/psLib/src/sys/psConfigure.c
- Timestamp:
- Jan 4, 2007, 11:39:46 AM (19 years ago)
- File:
-
- 1 edited
-
branches/jch-memory/psLib/src/sys/psConfigure.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jch-memory/psLib/src/sys/psConfigure.c
r10487 r10901 13 13 * @author Robert DeSonia, MHPCC 14 14 * 15 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $16 * @date $Date: 200 6-12-06 03:01:42$15 * @version $Revision: 1.20.2.1 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2007-01-04 21:39:46 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 58 58 } 59 59 60 // Print details of a memory problem to the appropriate file61 static void memoryProblem(const psMemBlock *ptr, // the pointer to the problematic memory block.62 const char *file, // the file in which the problem originated63 int lineno // the line number in which the problem originated64 )65 {66 fprintf(memCheckFile,67 "Memory corruption detected in memBlock %lu\n"68 "\tFile %s, line %d, size %zd\n"69 "\tPosts: %p %p %p\n",70 ptr->id, file, lineno, ptr->userMemorySize, ptr->startblock, ptr->endblock,71 (ptr + 1 + ptr->userMemorySize));72 }73 74 60 // Check the memory; intended for use on exit, but might be used elsewhere 75 61 void p_psMemoryCheck(void) … … 93 79 94 80 int nCorrupted; // Number of corrupted memory blocks 95 (void)psMemProblemCallbackSet((psMemProblemCallback)memoryProblem); // Set callback for corruption 96 nCorrupted = psMemCheckCorruption(false); 81 nCorrupted = psMemCheckCorruption(memCheckFile, false); 97 82 if (nCorrupted > 0) { 98 83 psError(PS_ERR_UNKNOWN, true, "%d memory blocks corrupted; list written to %s.\n", nCorrupted, memCheckName);
Note:
See TracChangeset
for help on using the changeset viewer.
