Module Name:    src
Committed By:   ragge
Date:           Sat Mar 31 06:32:48 UTC 2018

Modified Files:
        src/sys/arch/vax/vax: machdep.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/arch/vax/vax/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/vax/machdep.c
diff -u src/sys/arch/vax/vax/machdep.c:1.191 src/sys/arch/vax/vax/machdep.c:1.192
--- src/sys/arch/vax/vax/machdep.c:1.191	Tue Dec 16 11:23:11 2014
+++ src/sys/arch/vax/vax/machdep.c	Sat Mar 31 06:32:47 2018
@@ -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 @@ mm_md_readwrite(dev_t dev, struct uio *u
 		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;
+}

Reply via email to