IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32713


Ignore:
Timestamp:
Nov 18, 2011, 4:29:55 PM (15 years ago)
Author:
eugene
Message:

do not run possibly invalid test code in psMemory.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psMemory.c

    r32708 r32713  
    384384// pointer to the last mem block that was allocated.
    385385// This is the root of the entire memory list
    386 static psMemBlock *lastMemBlockAllocated = NULL;
     386static volatile psMemBlock *lastMemBlockAllocated = NULL;
    387387
    388388// set lock on lastMemBlockAllocated
     
    655655    memBlock->refCounter = 1;                   // one user so far
    656656
    657     psMemBlock *last0 = lastMemBlockAllocated;
    658     int flight0 = (lastMemBlockAllocated) ? lastMemBlockAllocated->inFlight : 10;
     657    // XXX these lines are test lines that potentially access invalid memory
     658    // XXX psMemBlock *last0 = lastMemBlockAllocated;
     659    // XXX int flight0 = (lastMemBlockAllocated) ? lastMemBlockAllocated->inFlight : 10;
    659660
    660661    // need exclusive access of the memory block list now...
     
    663664    BLOCKLAST_LOCK ();
    664665
    665     psMemBlock *last1 = lastMemBlockAllocated;
    666     int flight1 = (lastMemBlockAllocated) ? lastMemBlockAllocated->inFlight : 10;
    667 
    668     if (false) {
    669         fprintf (stderr, "last 0 : %lld, last 1 : %lld, flight0: %d, flight1: %d\n", (long long int) last0, (long long int) last1, (int) flight0, (int) flight1);
    670     }
     666    // XXX psMemBlock *last1 = lastMemBlockAllocated;
     667    // XXX int flight1 = (lastMemBlockAllocated) ? lastMemBlockAllocated->inFlight : 10;
     668
     669    // XXX if (false) {
     670    // XXX      fprintf (stderr, "last 0 : %lld, last 1 : %lld, flight0: %d, flight1: %d\n", (long long int) last0, (long long int) last1, (int) flight0, (int) flight1);
     671    // XXX }
    671672
    672673    // increment the memory id only after we've grabbed the memBlockListMutex this value is
Note: See TracChangeset for help on using the changeset viewer.