Subject: Re: failed to compile new ./lib/libc/stdlib/malloc.c
To: (NetBSD/sparc Maillist) <port-sparc@netbsd.org>
From: David Brownlee <abs@anim.dreamworks.com>
List: port-sparc
Date: 07/04/1999 09:24:15
	Since the sparc port has a variable pagesize, PGSHIFT is
	determined in terms of a kernel variable pgshift. This really does
	not help userland though.

	We _could_ make it conditional on a sysctl, but that would involve
	lots of extra calculation in the malloc() code - there are quite a
	few other variables that would switch from compile time definition
	to runtime calcuation.

	My feeling is to use the SUN4C/SUN4M values for PGSHIFT - and in
	fact to add a define for 'shift for maximum pagesize supported by
	this port' somewhere, and use that.

	For now I have:

--- malloc.c.orig	Sun Jul  4 09:24:12 1999
+++ malloc.c	Sun Jul  4 09:24:04 1999
@@ -69,7 +69,11 @@
 
 #if defined(__NetBSD__)
 #   include <sys/param.h>
-#   define malloc_pageshift             PGSHIFT
+#   if defined(__sparc__)
+#       define malloc_pageshift             SUN4CM_PGSHIFT
+#   else
+#       define malloc_pageshift             PGSHIFT
+#   endif
 #   define malloc_minsize               16U
 #endif /* __NetBSD__ */
 
		David/absolute

                  -=-  "Maybe god will cover up his eyes"  -=-