diff options
author | 2017-11-14 06:46:43 +0000 | |
---|---|---|
committer | 2017-11-14 06:46:43 +0000 | |
commit | 4c380d4ec6df1975f990a9d51fff036bcc30af2d (patch) | |
tree | 20f431af8ceca5df68a553fa2aa76343bc355d80 /sys/kern/kern_malloc.c | |
parent | move the adding of an ifqs counters in if_getdata to ifq.c (diff) | |
download | wireguard-openbsd-4c380d4ec6df1975f990a9d51fff036bcc30af2d.tar.xz wireguard-openbsd-4c380d4ec6df1975f990a9d51fff036bcc30af2d.zip |
remove MALLOC_DEBUG
the code has rotted, and obviously hasnt been used for ages. it is
also hard to make mpsafe. if we need something like this again it
would be better to do it from scratch.
ok tedu@ visa@
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 60b29ad437b..b448115593f 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.130 2017/07/10 23:49:10 dlg Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.131 2017/11/14 06:46:43 dlg Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -178,14 +178,6 @@ malloc(size_t size, int type, int flags) } #endif -#ifdef MALLOC_DEBUG - if (debug_malloc(size, type, flags, (void **)&va)) { - if ((flags & M_ZERO) && va != NULL) - memset(va, 0, size); - return (va); - } -#endif - if (size > 65535 * PAGE_SIZE) { if (flags & M_CANFAIL) { #ifndef SMALL_KERNEL @@ -380,11 +372,6 @@ free(void *addr, int type, size_t freedsize) if (addr == NULL) return; -#ifdef MALLOC_DEBUG - if (debug_free(addr, type)) - return; -#endif - #ifdef DIAGNOSTIC if (addr < (void *)kmembase || addr >= (void *)kmemlimit) panic("free: non-malloced addr %p type %s", addr, @@ -573,9 +560,6 @@ kmeminit(void) for (indx = 0; indx < M_LAST; indx++) kmemstats[indx].ks_limit = nkmempages * PAGE_SIZE * 6 / 10; #endif -#ifdef MALLOC_DEBUG - debug_malloc_init(); -#endif } /* |