OSDN Git Service

[Refactor] 使われていないプリプロVERBOSE_RALLOC を削除 / Removed unused preprocessor VERBOSE_RALLOC
authorHourier <hourier@users.sourceforge.jp>
Fri, 14 Feb 2020 15:33:17 +0000 (00:33 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 14 Feb 2020 15:33:17 +0000 (00:33 +0900)
src/z-virt.c

index bd1559f..4c7ca18 100644 (file)
 #include "z-util.h"
 
 /*
- * Allow debugging messages to track memory usage.
- */
-#ifdef VERBOSE_RALLOC
-static long virt_make = 0;
-static long virt_kill = 0;
-static long virt_size = 0;
-#endif
-
-
-/*
  * Optional auxiliary "rnfree" function
  */
 vptr (*rnfree_aux)(vptr, huge) = NULL;
@@ -36,21 +26,6 @@ vptr rnfree(vptr p, huge len)
        /* Easy to free zero bytes */
        if (len == 0) return (NULL);
 
-#ifdef VERBOSE_RALLOC
-
-       /* Decrease memory count */
-       virt_kill += len;
-
-       if (len > virt_size)
-       {
-               char buf[80];
-               sprintf(buf, "Kill (%ld): %ld - %ld = %ld.",
-                       len, virt_make, virt_kill, virt_make - virt_kill);
-               plog(buf);
-       }
-
-#endif
-
        /* Use the "aux" function */
        if (rnfree_aux) return ((*rnfree_aux)(p, len));
 
@@ -177,5 +152,3 @@ errr string_free(concptr str)
        /* Success */
        return 0;
 }
-
-