Changeset 4321 for trunk/psLib/src/sys/psMemory.c
- Timestamp:
- Jun 20, 2005, 12:42:30 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psMemory.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psMemory.c
r4298 r4321 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.5 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 17 21:42:02$10 * @version $Revision: 1.54 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-20 22:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 255 255 } 256 256 257 psS32 psMemCheckCorruption(psBool abort_on_error)257 int psMemCheckCorruption(bool abort_on_error) 258 258 { 259 259 psS32 nbad = 0; // number of bad blocks … … 504 504 505 505 // return refCounter 506 psReferenceCount psMemGetRefCounter( psPtr vptr)507 { 508 psMemBlock* ptr ;506 psReferenceCount psMemGetRefCounter(const psPtr ptr) 507 { 508 psMemBlock* ptr2; 509 509 psU32 refCount; 510 510 511 if ( vptr == NULL) {511 if (ptr == NULL) { 512 512 return 0; 513 513 } 514 514 515 ptr = ((psMemBlock* ) vptr) - 1;516 517 if (checkMemBlock(ptr , __func__) != 0) {518 memProblemCallback(ptr , __func__, __LINE__);519 } 520 521 pthread_mutex_lock(&ptr ->refCounterMutex);522 refCount = ptr ->refCounter;523 pthread_mutex_unlock(&ptr ->refCounterMutex);515 ptr2 = ((psMemBlock* ) ptr) - 1; 516 517 if (checkMemBlock(ptr2, __func__) != 0) { 518 memProblemCallback(ptr2, __func__, __LINE__); 519 } 520 521 pthread_mutex_lock(&ptr2->refCounterMutex); 522 refCount = ptr2->refCounter; 523 pthread_mutex_unlock(&ptr2->refCounterMutex); 524 524 525 525 return refCount;
Note:
See TracChangeset
for help on using the changeset viewer.
