Source-Changes-HG archive

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

[src/trunk]: src/sys/kern ifdef DEBUG, increase the max size we'll overwrite ...



details:   https://anonhg.NetBSD.org/src/rev/73fee8b1ad4e
branches:  trunk
changeset: 499578:73fee8b1ad4e
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Nov 24 00:34:32 2000 +0000

description:
ifdef DEBUG, increase the max size we'll overwrite in freed memory blocks
to detect modifications after frees from 32 bytes to 1 page.

diffstat:

 sys/kern/kern_malloc.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r d4c615b69dfa -r 73fee8b1ad4e sys/kern/kern_malloc.c
--- a/sys/kern/kern_malloc.c    Fri Nov 24 00:17:35 2000 +0000
+++ b/sys/kern/kern_malloc.c    Fri Nov 24 00:34:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_malloc.c,v 1.54 2000/06/27 17:41:22 mrg Exp $     */
+/*     $NetBSD: kern_malloc.c,v 1.55 2000/11/24 00:34:32 chs Exp $     */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -171,7 +171,11 @@
  * that modifications after frees can be detected.
  */
 #define WEIRD_ADDR     ((unsigned) 0xdeadbeef)
+#ifdef DEBUG
+#define MAX_COPY       PAGE_SIZE
+#else
 #define MAX_COPY       32
+#endif
 
 /*
  * Normally the freelist structure is used only to hold the list pointer



Home | Main Index | Thread Index | Old Index