Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Set max/dfl size for vm a process may have ...



details:   https://anonhg.NetBSD.org/src/rev/3901b8a52b8e
branches:  trunk
changeset: 831453:3901b8a52b8e
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sat Mar 31 06:32:47 2018 +0000

description:
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.

diffstat:

 sys/arch/vax/vax/machdep.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 91faa9adc63e -r 3901b8a52b8e sys/arch/vax/vax/machdep.c
--- a/sys/arch/vax/vax/machdep.c        Sat Mar 31 04:23:33 2018 +0000
+++ b/sys/arch/vax/vax/machdep.c        Sat Mar 31 06:32:47 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.191 2014/12/16 11:23:11 jklos Exp $   */
+/* $NetBSD: machdep.c,v 1.192 2018/03/31 06:32:47 ragge Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2014/12/16 11:23:11 jklos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.192 2018/03/31 06:32:47 ragge Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -765,3 +765,14 @@
                return ENXIO;
        }
 }
+
+/*
+ * Set max virtual size a process may allocate.
+ * This could be tuned based on amount of physical memory.
+ */
+void
+machdep_init(void)
+{
+       proc0.p_rlimit[RLIMIT_AS].rlim_cur = DFLDSIZ;
+       proc0.p_rlimit[RLIMIT_AS].rlim_max = MAXDSIZ;
+}



Home | Main Index | Thread Index | Old Index