]> sjero.net Git - wget/blobdiff - src/xmalloc.c
[svn] Warn the user to increase SZ before aborting.
[wget] / src / xmalloc.c
index ab5ac81211cc7b5337240e4d8bdde587e77ab197..75112c6b2b1aed76f9652076b92124a7b2dc7f2c 100644 (file)
@@ -218,9 +218,8 @@ static int malloc_count, free_count;
 
 /* Home-grown hash table of mallocs: */
 
-#define SZ 100003              /* Prime number a little over 100,000.
-                                  Increase the table size if you need
-                                  to debug larger Wget runs.  */
+#define SZ 100003              /* Prime just over 100,000.  Increase
+                                  it to debug larger Wget runs.  */
 
 static struct {
   const void *ptr;
@@ -250,7 +249,11 @@ register_ptr (const void *ptr, const char *file, int line)
 {
   int i;
   if (malloc_count - free_count > SZ)
-    abort ();
+    {
+      fprintf (stderr, "Increase SZ to a larger value and recompile.\n");
+      fflush (stderr);
+      abort ();
+    }
 
   i = ptr_position (ptr);
   malloc_table[i].ptr = ptr;