This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix HBLKSIZE on ppc64-linux
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Andrew Haley <aph at redhat dot com>, Hans Boehm <Hans dot Boehm at hp dot com>, java at gcc dot gnu dot org
- Date: Mon, 23 May 2005 10:18:39 -0400
- Subject: [PATCH] Fix HBLKSIZE on ppc64-linux
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
boehm-gc apparently requires that all mmap returned chunks are HBLKSIZE
bytes aligned.
The default setting of HBLKSIZE is 4K on 32-bit arches and 8K on 64-bit
arches. On the few 64-bit architectures where page size is 4K
boehm-gc usually overrides this in gcconfig.h (e.g. on x86_64 or s390x),
but not so on ppc64. This leads to hangs in ppc64-linux gij tests
(as boehm-gc usually segfaults and segfault handler attempts to allocate
memory, but GC's lock is held).
I'm posting this on behalf of Andrew who has done all the work on this.
Ok for HEAD/4.0/3.4 branches? Bootstrapped/regtested on ppc64-linux.
2005-05-23 Andrew Haley <aph@redhat.com>
* include/private/gcconfig.h (HBLKSIZE): Define to 4096 on
powerpc64-linux.
--- boehm-gc/include/private/gcconfig.h 2005-05-06 12:44:28.000000000 +0200
+++ boehm-gc/include/private/gcconfig.h 2005-05-13 16:09:28.000000000 +0200
@@ -722,6 +722,7 @@
# if (defined (powerpc64) || defined(__powerpc64__))
# define ALIGNMENT 8
# define CPP_WORDSZ 64
+# define HBLKSIZE 4096
# else
# define ALIGNMENT 4
# endif
Jakub