IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28401


Ignore:
Timestamp:
Jun 18, 2010, 10:47:02 AM (16 years ago)
Author:
Paul Price
Message:

Adding comment on race condition in psMemory: don't need to deal with it (here) because it is the user's responsibility not to completely free memory that's being used in a thread (without protection). No functional change.

File:
1 edited

Legend:

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

    r23305 r28401  
    452452    #endif
    453453
     454    // XXX Looking at the reference counter is subject to a race condition because this function is generally
     455    // not locked.  Normally this is not a problem because though we may increment and decrement references
     456    // within a thread, we don't destroy the object completely (which is what we're checking for here).  It is
     457    // the user's responsibility to protect against the complete destruction of memory either by not doing it
     458    // or by locking on all reference changes for that memory.
    454459    if (memBlock->refCounter < 1) {
    455460        // using an unreferenced block of memory, are you?
Note: See TracChangeset for help on using the changeset viewer.