From 650f2fd4b050f680c470a5379f4f37ae2993e5a7 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 28 Jun 2010 15:22:00 +0000 Subject: Change MAXDSIZ and MAXSSIZ to more reasonable values for a 64-bit architecture. ok deraadt@, miod@ --- sys/arch/sparc64/include/vmparam.h | 40 +++++--------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) (limited to 'sys/arch/sparc64') diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h index 3d9e6d8fad8..5c8aa20c079 100644 --- a/sys/arch/sparc64/include/vmparam.h +++ b/sys/arch/sparc64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.20 2010/06/27 03:03:48 thib Exp $ */ +/* $OpenBSD: vmparam.h,v 1.21 2010/06/28 15:21:59 kettenis Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */ /* @@ -58,11 +58,7 @@ /* * Virtual memory related constants, all in bytes */ -/* #ifdef __arch64__ */ -#if 0 /* - * 64-bit limits: - * * Since the compiler generates `call' instructions we can't * have more than 4GB in a single text segment. * @@ -70,45 +66,19 @@ * of that for data and the other half for stack. */ #ifndef MAXTSIZ -#define MAXTSIZ (4L*1024*1024*1024) /* max text size */ +#define MAXTSIZ (1L*1024*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (128L*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (512L*1024*1024*1024) /* max data size */ -#endif -#ifndef DFLSSIZ -#define DFLSSIZ (1024*1024) /* initial stack size limit */ -#endif -#ifndef MAXSSIZ -#define MAXSSIZ MAXDSIZ /* max stack size */ -#endif -#else -/* - * 32-bit limits: - * - * We only have 4GB to play with. Limit stack, data, and text - * each to half of that. - * - * This is silly. Apparently if we go above these numbers - * integer overflows in other parts of the kernel cause hangs. - */ -#ifndef MAXTSIZ -#define MAXTSIZ (1*1024*1024*1024) /* max text size */ -#endif -#ifndef DFLDSIZ -#define DFLDSIZ (128*1024*1024) /* initial data size limit */ -#endif -#ifndef MAXDSIZ -#define MAXDSIZ (1*1024*1024*1024) /* max data size */ +#define MAXDSIZ (8L*1024*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ -#define DFLSSIZ (1024*1024) /* initial stack size limit */ +#define DFLSSIZ (2L*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (8*1024*1024) /* max stack size */ -#endif +#define MAXSSIZ (32L*1024*1024) /* max stack size */ #endif #define STACKGAP_RANDOM 256*1024 -- cgit v1.2.3