Index: trunk/psLib/src/sys/psMemory.h
===================================================================
--- trunk/psLib/src/sys/psMemory.h	(revision 31660)
+++ trunk/psLib/src/sys/psMemory.h	(revision 32174)
@@ -367,4 +367,11 @@
     bool persistence                   ///< make check across all object even persistent ones
 );
+int psMemCheckLeaks2(
+    psMemId id0,                       ///< don't list blocks with id < id0
+    psMemBlock ***array,               ///< pointer to array of pointers to leaked blocks, or NULL
+    FILE * fd,                         ///< print list of leaks to fd (or NULL)
+    bool persistence,                  ///< make check across all object even persistent ones
+    int maxDisplayedLeaksCount         ///< List at most maxDisplayedLeaksCount (-1 for all)
+);
 #else // ifdef DOXYGEN
 int p_psMemCheckLeaks(
@@ -375,9 +382,12 @@
     psMemBlock ***array,                ///< pointer to array of pointers to leaked blocks, or NULL
     FILE * fd,                          ///< print list of leaks to fd (or NULL)
-    bool persistence                    ///< make check across all object even persistent ones
-);
-#ifndef SWIG
+    bool persistence,                   ///< make check across all object even persistent ones
+    int maxDisplayedLeaksCount          ///< List at most maxDisplayedLeaksCount (-1 for all)
+);
+#ifndef SWIG
+#define psMemCheckLeaks2(id0, array, fd, persistence, maxDisplayedLeaksCount) \
+      p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence, maxDisplayedLeaksCount)
 #define psMemCheckLeaks(id0, array, fd, persistence) \
-      p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence)
+      p_psMemCheckLeaks(__FILE__, __LINE__, __func__, id0, array, fd, persistence, 500)
 #endif // ifndef SWIG
 #endif // ifdef DOXYGEN
