summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-05-02 02:08:48 +0000
committerjeff <jeff@FreeBSD.org>2002-05-02 02:08:48 +0000
commitb152d5fbb5c19a734918705720935da121992010 (patch)
tree3151c53a5a4481a8b9fedf0d8f1ab5cfaa46389f /sys/kern/kern_malloc.c
parentc136e5d44278a6b1c5a93a71adab858b5e07503b (diff)
downloadFreeBSD-src-b152d5fbb5c19a734918705720935da121992010.zip
FreeBSD-src-b152d5fbb5c19a734918705720935da121992010.tar.gz
Remove the temporary alignment check in free().
Implement the following checks on freed memory in the bucket path: - Slab membership - Alignment - Duplicate free This previously was only done if we skipped the buckets. This code will slow down INVARIANTS a bit, but it is smp safe. The checks were moved out of the normal path and into hooks supplied in uma_dbg.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 56769ad..57a3b80 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -208,12 +208,6 @@ free(addr, type)
if (addr == NULL)
return;
- if ((u_long)addr & 3) { /* XXX: Jeff: find better value for 3 */
- printf("free(9)'ing unaligned pointer %p\n", addr);
- Debugger("Don't do that...");
- return;
- }
-
size = 0;
mem = (void *)((u_long)addr & (~UMA_SLAB_MASK));
OpenPOWER on IntegriCloud