Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib EXTRA_SANITY -> MALLOC_EXTRA_SANITY, consist...



details:   https://anonhg.NetBSD.org/src/rev/91a3c32062a6
branches:  trunk
changeset: 474409:91a3c32062a6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jul 05 21:08:38 1999 +0000

description:
EXTRA_SANITY -> MALLOC_EXTRA_SANITY, consistently.

diffstat:

 lib/libc/stdlib/malloc.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (86 lines):

diff -r ba4ae0bdb3ed -r 91a3c32062a6 lib/libc/stdlib/malloc.c
--- a/lib/libc/stdlib/malloc.c  Mon Jul 05 20:33:58 1999 +0000
+++ b/lib/libc/stdlib/malloc.c  Mon Jul 05 21:08:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: malloc.c,v 1.18 1999/07/04 03:12:47 thorpej Exp $      */
+/*     $NetBSD: malloc.c,v 1.19 1999/07/05 21:08:38 thorpej Exp $      */
 
 /*
  * ----------------------------------------------------------------------------
@@ -13,7 +13,7 @@
  */
 
 /*
- * Defining EXTRA_SANITY will enable extra checks which are related
+ * Defining MALLOC_EXTRA_SANITY will enable extra checks which are related
  * to internal conditions and consistency in malloc.c. This has a
  * noticeable runtime performance hit, and generally will not do you
  * any good unless you fiddle with the internals of malloc or want
@@ -319,9 +319,9 @@
     tail = result + (pages << malloc_pageshift);
 
     if (brk(tail)) {
-#ifdef EXTRA_SANITY
+#ifdef MALLOC_EXTRA_SANITY
        wrterror("(ES): map_pages fails\n");
-#endif /* EXTRA_SANITY */
+#endif /* MALLOC_EXTRA_SANITY */
        return 0;
     }
 
@@ -399,9 +399,9 @@
 
     INIT_MMAP();
 
-#ifdef EXTRA_SANITY
+#ifdef MALLOC_EXTRA_SANITY
     malloc_junk = 1;
-#endif /* EXTRA_SANITY */
+#endif /* MALLOC_EXTRA_SANITY */
 
     for (i = 0; i < 3; i++) {
        if (i == 0) {
@@ -515,7 +515,7 @@
     /* Look for free pages before asking for more */
     for(pf = free_list.next; pf; pf = pf->next) {
 
-#ifdef EXTRA_SANITY
+#ifdef MALLOC_EXTRA_SANITY
        if (pf->size & malloc_pagemask)
            wrterror("(ES): junk length entry on free_list\n");
        if (!pf->size)
@@ -530,7 +530,7 @@
            wrterror("(ES): non-free first page on free-list\n");
        if (page_dir[ptr2index(pf->end)-1] != MALLOC_FREE)
            wrterror("(ES): non-free last page on free-list\n");
-#endif /* EXTRA_SANITY */
+#endif /* MALLOC_EXTRA_SANITY */
 
        if (pf->size < size)
            continue;
@@ -550,10 +550,10 @@
        break;
     }
 
-#ifdef EXTRA_SANITY
+#ifdef MALLOC_EXTRA_SANITY
     if (p && page_dir[ptr2index(p)] != MALLOC_FREE)
        wrterror("(ES): allocated non-free page on free-list\n");
-#endif /* EXTRA_SANITY */
+#endif /* MALLOC_EXTRA_SANITY */
 
     size >>= malloc_pageshift;
 
@@ -1009,10 +1009,10 @@
     /* Find & remove this page in the queue */
     while (*mp != info) {
        mp = &((*mp)->next);
-#ifdef EXTRA_SANITY
+#ifdef MALLOC_EXTRA_SANITY
        if (!*mp)
                wrterror("(ES): Not on queue\n");
-#endif /* EXTRA_SANITY */
+#endif /* MALLOC_EXTRA_SANITY */
     }
     *mp = info->next;
 



Home | Main Index | Thread Index | Old Index