From 56392ab40b687e2753a746ed56624fbe8658b182 Mon Sep 17 00:00:00 2001 From: atatat Date: Sat, 21 Feb 2004 03:27:57 +0000 Subject: [PATCH] Use KERN_PROCSLOP for struct kinfo_proc and KERN_LWPSLOP for struct kinfo_lwp, and not vice versa. Should solve the issue with top dying because it's unable to "allocate memory". --- sys/kern/init_sysctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/init_sysctl.c b/sys/kern/init_sysctl.c index ddfd7e5f77ec..1aac23ef7ad2 100644 --- a/sys/kern/init_sysctl.c +++ b/sys/kern/init_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.21 2004/02/19 03:57:56 atatat Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.22 2004/02/21 03:27:57 atatat Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.21 2004/02/19 03:57:56 atatat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.22 2004/02/21 03:27:57 atatat Exp $"); #include "opt_sysv.h" #include "opt_multiprocessor.h" @@ -1505,7 +1505,7 @@ sysctl_kern_lwp(SYSCTLFN_ARGS) if (needed > *oldlenp) return (ENOMEM); } else { - needed += KERN_PROCSLOP; + needed += KERN_LWPSLOP; *oldlenp = needed; } return (0); @@ -1799,7 +1799,7 @@ again: if (needed > *oldlenp) return (ENOMEM); } else { - needed += KERN_LWPSLOP; + needed += KERN_PROCSLOP; *oldlenp = needed; } return (0);