diff options
| author | thorpej <thorpej@NetBSD.org> | 1999-07-05 21:08:38 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 1999-07-05 21:08:38 +0000 |
| commit | b2146da05ad9ea2737d19977bc024985d411eea3 (patch) | |
| tree | 177f8901b5ed6ccff0b17edbce8d7b7f482e2e34 /lib/libc/stdlib/malloc.c | |
| parent | 8fc3744ddd1d5e6b5dbfadc70d39c93960c86feb (diff) | |
EXTRA_SANITY -> MALLOC_EXTRA_SANITY, consistently.
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
| -rw-r--r-- | lib/libc/stdlib/malloc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 6a3e63774eb..064204f18c9 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -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 @@ map_pages(int pages) 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 @@ malloc_init (void) 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 @@ malloc_pages(size_t size) /* 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 @@ malloc_pages(size_t size) 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 @@ malloc_pages(size_t size) 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 @@ free_bytes(void *ptr, int index, struct pginfo *info) /* 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; |
