IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10901


Ignore:
Timestamp:
Jan 4, 2007, 11:39:46 AM (19 years ago)
Author:
jhoblitt
Message:

switch to new psMemCheckCorruption() semantics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jch-memory/psLib/src/sys/psConfigure.c

    r10487 r10901  
    1313 *  @author Robert DeSonia, MHPCC
    1414 *
    15  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2006-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 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5858}
    5959
    60 // Print details of a memory problem to the appropriate file
    61 static void memoryProblem(const psMemBlock *ptr, // the pointer to the problematic memory block.
    62                           const char *file, // the file in which the problem originated
    63                           int lineno    // the line number in which the problem originated
    64                          )
    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 
    7460// Check the memory; intended for use on exit, but might be used elsewhere
    7561void p_psMemoryCheck(void)
     
    9379
    9480    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);
    9782    if (nCorrupted > 0) {
    9883        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.