Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use vm_map_{min, max}() rather than accessing struct...
details: https://anonhg.NetBSD.org/src/rev/d9b759cc4764
branches: trunk
changeset: 551063:d9b759cc4764
user: enami <enami%NetBSD.org@localhost>
date: Thu Aug 28 14:54:32 2003 +0000
description:
Use vm_map_{min,max}() rather than accessing struct vm_map.header.{start,end}
directly.
diffstat:
sys/kern/kern_malloc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 83d03f83508a -r d9b759cc4764 sys/kern/kern_malloc.c
--- a/sys/kern/kern_malloc.c Thu Aug 28 14:44:48 2003 +0000
+++ b/sys/kern/kern_malloc.c Thu Aug 28 14:54:32 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_malloc.c,v 1.82 2003/08/26 21:48:53 manu Exp $ */
+/* $NetBSD: kern_malloc.c,v 1.83 2003/08/28 14:54:32 enami Exp $ */
/*
* Copyright (c) 1987, 1991, 1993
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.82 2003/08/26 21:48:53 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.83 2003/08/28 14:54:32 enami Exp $");
#include "opt_lockdebug.h"
@@ -490,8 +490,8 @@
* have allocated in the first place. That is, check
* to see that the address is within kmem_map.
*/
- if (__predict_false((vaddr_t)addr < kmem_map->header.start ||
- (vaddr_t)addr >= kmem_map->header.end))
+ if (__predict_false((vaddr_t)addr < vm_map_min(kmem_map) ||
+ (vaddr_t)addr >= vm_map_max(kmem_map)))
panic("free: addr %p not within kmem_map", addr);
#endif
Home |
Main Index |
Thread Index |
Old Index