Changeset 32713
- Timestamp:
- Nov 18, 2011, 4:29:55 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psMemory.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psMemory.c
r32708 r32713 384 384 // pointer to the last mem block that was allocated. 385 385 // This is the root of the entire memory list 386 static psMemBlock *lastMemBlockAllocated = NULL;386 static volatile psMemBlock *lastMemBlockAllocated = NULL; 387 387 388 388 // set lock on lastMemBlockAllocated … … 655 655 memBlock->refCounter = 1; // one user so far 656 656 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; 659 660 660 661 // need exclusive access of the memory block list now... … … 663 664 BLOCKLAST_LOCK (); 664 665 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 } 671 672 672 673 // increment the memory id only after we've grabbed the memBlockListMutex this value is
Note:
See TracChangeset
for help on using the changeset viewer.
