IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2011, 10:04:37 AM (15 years ago)
Author:
Serge CHASTEL
Message:

Added psMemCheckLeaks2() in which the number of leaks to be displayed can be set. psMemCheckLeaks keeps its default behavior (500 displayed messages)

File:
1 edited

Legend:

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

    r31660 r32174  
    367367    bool persistence                   ///< make check across all object even persistent ones
    368368);
     369int psMemCheckLeaks2(
     370    psMemId id0,                       ///< don't list blocks with id < id0
     371    psMemBlock ***array,               ///< pointer to array of pointers to leaked blocks, or NULL
     372    FILE * fd,                         ///< print list of leaks to fd (or NULL)
     373    bool persistence,                  ///< make check across all object even persistent ones
     374    int maxDisplayedLeaksCount         ///< List at most maxDisplayedLeaksCount (-1 for all)
     375);
    369376#else // ifdef DOXYGEN
    370377int p_psMemCheckLeaks(
     
    375382    psMemBlock ***array,                ///< pointer to array of pointers to leaked blocks, or NULL
    376383    FILE * fd,                          ///< print list of leaks to fd (or NULL)
    377     bool persistence                    ///< make check across all object even persistent ones
    378 );
    379 #ifndef SWIG
     384    bool persistence,                   ///< make check across all object even persistent ones
     385    int maxDisplayedLeaksCount          ///< List at most maxDisplayedLeaksCount (-1 for all)
     386);
     387#ifndef SWIG
     388#define psMemCheckLeaks2(id0, array, fd, persistence, maxDisplayedLeaksCount) \
     389      p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence, maxDisplayedLeaksCount)
    380390#define psMemCheckLeaks(id0, array, fd, persistence) \
    381       p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence)
     391      p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence, 500)
    382392#endif // ifndef SWIG
    383393#endif // ifdef DOXYGEN
Note: See TracChangeset for help on using the changeset viewer.