IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 14, 2004, 1:48:25 PM (22 years ago)
Author:
desonia
Message:

adjustments to coorespond to adding persistent flag to psMemBlock, i.e.,
exclusion of internal library blocks in memory leak checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psMemory.h

    r1606 r1810  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-23 22:36:03 $
     14 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-09-14 23:48:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7373    pthread_mutex_t refCounterMutex;   ///< mutex to ensure exclusive access to reference counter
    7474    psReferenceCount refCounter;       ///< how many times pointer is referenced
     75    bool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
    7576    const void *endblock;              ///< initialised to p_psMEMMAGIC
    7677}
     
    163164    void *ptr                          ///< the memory block
    164165);
     166
     167/** Set the memory as persistent so that it is ignored when detecting memory leaks.
     168 *
     169 *  Used to mark a memory block as persistent data within the library,
     170 *  i.e., non user-level data used to hold psLib's state or cache data.  Such
     171 *  examples of this class of memory is psTrace's trace-levels and dynamic
     172 *  error codes.
     173 *
     174 *  Memory marked as persistent is excluded from memory leak checks.
     175 *
     176 */
     177void p_psMemSetPersistent(
     178    void *ptr,                         ///< the memory block to operate on
     179    bool value                         ///< true if memory is persistent, otherwise false
     180);
     181
     182/** Get the memory's persistent flag.
     183 *
     184 *  Checks if a memory block has been marked as persistent by
     185 *  p_psMemSetPresistent.
     186 *
     187 *  Memory marked as persistent is excluded from memory leak checks.
     188 *
     189 *  @return bool    true if memory is marked persistent, otherwise false.
     190 */
     191bool p_psMemGetPersistent(
     192    void *ptr                          ///< the memory block to check.
     193);
     194
    165195
    166196/** Memory re-allocation.  This operates much like realloc(), but is guaranteed to return a non-NULL value.
Note: See TracChangeset for help on using the changeset viewer.