From 1b2a1e164cac68fc8382984c0c4cc8ae47b10de0 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 5 Mar 2018 01:15:27 +0000 Subject: #define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan --- sys/arch/i386/include/_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/include') diff --git a/sys/arch/i386/include/_types.h b/sys/arch/i386/include/_types.h index 73582c1d7fc..7da9a3c6ea8 100644 --- a/sys/arch/i386/include/_types.h +++ b/sys/arch/i386/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.22 2015/09/26 16:01:00 guenther Exp $ */ +/* $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -49,6 +49,7 @@ #define _STACKALIGNBYTES 15 #define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) #define _ALIGNED_POINTER(p,t) 1 +#define _MAX_PAGE_SHIFT 12 /* same as PAGE_SHIFT */ #if defined(_KERNEL) typedef struct label_t { -- cgit v1.2.3