Sun Nov 22 11:42:55 2015 UTC ()
Reduce the "MAXDSIZ" limit for bottom-up-VA (i.e. old binaries) processes
to the old limit of 1 GB. Some old binaries can not deal with more.


(martin)
diff -r1.35 -r1.36 src/sys/arch/sparc64/include/vmparam.h

cvs diff -r1.35 -r1.36 src/sys/arch/sparc64/include/vmparam.h (expand / switch to unified diff)

--- src/sys/arch/sparc64/include/vmparam.h 2015/11/15 20:35:33 1.35
+++ src/sys/arch/sparc64/include/vmparam.h 2015/11/22 11:42:55 1.36
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vmparam.h,v 1.35 2015/11/15 20:35:33 martin Exp $ */ 1/* $NetBSD: vmparam.h,v 1.36 2015/11/22 11:42:55 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This software was developed by the Computer Systems Engineering group 7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
9 * contributed to Berkeley. 9 * contributed to Berkeley.
10 * 10 *
11 * All advertising materials mentioning features or use of this software 11 * All advertising materials mentioning features or use of this software
12 * must display the following acknowledgement: 12 * must display the following acknowledgement:
13 * This product includes software developed by the University of 13 * This product includes software developed by the University of
14 * California, Lawrence Berkeley Laboratory. 14 * California, Lawrence Berkeley Laboratory.
@@ -92,27 +92,27 @@ @@ -92,27 +92,27 @@
92#define MAXTSIZ (4UL*1024*1024*1024) /* max text size */ 92#define MAXTSIZ (4UL*1024*1024*1024) /* max text size */
93#endif 93#endif
94#ifndef DFLDSIZ 94#ifndef DFLDSIZ
95#define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ 95#define DFLDSIZ (128UL*1024*1024) /* initial data size limit */
96#endif 96#endif
97#ifndef MAXDSIZ 97#ifndef MAXDSIZ
98#define MAXDSIZ (1UL<<39) /* max data size */ 98#define MAXDSIZ (1UL<<39) /* max data size */
99/* 99/*
100 * For processes not using topdown VA, we need to limit the data size - 100 * For processes not using topdown VA, we need to limit the data size -
101 * they probably have not been compiled with the proper compiler memory 101 * they probably have not been compiled with the proper compiler memory
102 * model. 102 * model.
103 */ 103 */
104#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \ 104#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
105 round_page((vaddr_t)(da) + (vsize_t)max(maxdmap,2UL*1024*1024*1024)) 105 round_page((vaddr_t)(da) + (vsize_t)max(maxdmap,1UL*1024*1024*1024))
106#endif 106#endif
107#ifndef DFLSSIZ 107#ifndef DFLSSIZ
108#define DFLSSIZ (2*1024*1024) /* initial stack size limit */ 108#define DFLSSIZ (2*1024*1024) /* initial stack size limit */
109#endif 109#endif
110#ifndef MAXSSIZ 110#ifndef MAXSSIZ
111#define MAXSSIZ (128*1024*1024) /* max stack size */ 111#define MAXSSIZ (128*1024*1024) /* max stack size */
112#endif 112#endif
113#else 113#else
114/* 114/*
115 * 32-bit limits: 115 * 32-bit limits:
116 * 116 *
117 * We only have 4GB to play with. Limit data, and text 117 * We only have 4GB to play with. Limit data, and text
118 * each to half of that and set a reasonable stack limit. 118 * each to half of that and set a reasonable stack limit.