Changeset 5 for trunk


Ignore:
Timestamp:
Jul 31, 2002 12:57:03 PM (18 years ago)
Author:
forrest
Message:

To stop valgrind complaining

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpPrimalColumnSteepest.cpp

    r2 r5  
    891891    // initialize to 1.0
    892892    // and set reference framework
    893     if (!reference_)
    894       reference_ = new unsigned int[(numberRows+numberColumns+31)>>5];
    895     assert (sizeof(unsigned int)==4);
    896    
     893    if (!reference_) {
     894      int nWords = (number+31)>>5;
     895      reference_ = new unsigned int[nWords];
     896      assert (sizeof(unsigned int)==4);
     897      // tiny overhead to zero out (stops valgrind complaining)
     898      memset(reference_,0,nWords*sizeof(int));
     899    }
    897900   
    898901    for (iSequence=0;iSequence<number;iSequence++) {
Note: See TracChangeset for help on using the changeset viewer.