IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 3, 2007, 12:04:42 PM (19 years ago)
Author:
jhoblitt
Message:

change psMemCheckCorruption() to hold the memBlockList mutex the entire time it is invoked

File:
1 edited

Legend:

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

    r10893 r10894  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.88.2.6 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-01-03 21:55:11 $
     10*  @version $Revision: 1.88.2.7 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2007-01-03 22:04:42 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    305305    psBool failure = false;
    306306
    307     // get exclusive access to the memBlock list to avoid it changing on us while we use it.
    308     //    MUTEX_LOCK(&memBlockListMutex);
     307    // get exclusive access to the memBlock list to avoid it changing on us
     308    // while we use it.
     309    MUTEX_LOCK(&memBlockListMutex);
    309310
    310311    for (psMemBlock* iter = lastMemBlockAllocated; iter != NULL; iter = iter->nextBlock) {
    311         MUTEX_UNLOCK(&memBlockListMutex);
    312         failure = checkMemBlock(iter, __func__);
    313         MUTEX_LOCK(&memBlockListMutex);
    314         if ( failure ) {
     312        if (checkMemBlock(iter, __func__)) {
    315313            nbad++;
    316314
Note: See TracChangeset for help on using the changeset viewer.