IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11017


Ignore:
Timestamp:
Jan 10, 2007, 2:46:34 PM (19 years ago)
Author:
jhoblitt
Message:

add a memBlock->size test to isBadMemBlock()

File:
1 edited

Legend:

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

    r11016 r11017  
    1010*  @author Joshua Hoblitt, University of Hawaii
    1111*
    12 *  @version $Revision: 1.88.2.26 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-01-11 00:22:00 $
     12*  @version $Revision: 1.88.2.27 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-01-11 00:46:34 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    155155    }
    156156
     157    // Currently psAlloc()/psRealloc() will blindly create memBlock's with a
     158    // size of 0.  This test is in here to check if this is really
     159    // happening/being use as a feature in the wild.
     160    if (memBlock->size < 1) {
     161        psMemBlockPrint(output, memBlock);
     162        blockPrinted = true;
     163        fprintf(output, _("\n\tMemory block has a size of less than 1.\n"));
     164        bad = true;
     165    }
     166
    157167    if (memBlock->refCounter < 1) {
    158168        // using an unreferenced block of memory, are you?
Note: See TracChangeset for help on using the changeset viewer.