[kaffe] CVS kaffe (guilhem): Fix for Mac OSX which seems not to support correctly sbrk.

Kaffe CVS cvs-commits at kaffe.org
Fri Jul 23 12:50:23 PDT 2004


PatchSet 5004 
Date: 2004/07/23 17:02:44
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fix for Mac OSX which seems not to support correctly sbrk.

        * config/powerpc/darwin/md.h: Define a symbol called DARWIN
        when we are on a darwin OS.

        * kaffe/kaffevm/kaffe-gc/gc-mem.c
        (pagealloc): If this is darwin, don't use sbrk as it seems to
        be broken.

Members: 
	ChangeLog:1.2564->1.2565 
	config/powerpc/darwin/md.h:1.7->1.8 
	kaffe/kaffevm/kaffe-gc/gc-mem.c:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2564 kaffe/ChangeLog:1.2565
--- kaffe/ChangeLog:1.2564	Fri Jul 23 16:50:33 2004
+++ kaffe/ChangeLog	Fri Jul 23 17:02:44 2004
@@ -1,5 +1,14 @@
 2004-07-23  Guilhem Lavaux <guilhem at kaffe.org>
 
+	* config/powerpc/darwin/md.h: Define a symbol called DARWIN
+	when we are on a darwin OS.
+
+	* kaffe/kaffevm/kaffe-gc/gc-mem.c
+	(pagealloc): If this is darwin, don't use sbrk as it seems to
+	be broken.
+
+2004-07-23  Guilhem Lavaux <guilhem at kaffe.org>
+
 	* config/powerpc/common.h: Define ALIGNMENT_OF_SIZE.
 
 2004-07-23  Guilhem Lavaux <guilhem at kaffe.org>
Index: kaffe/config/powerpc/darwin/md.h
diff -u kaffe/config/powerpc/darwin/md.h:1.7 kaffe/config/powerpc/darwin/md.h:1.8
--- kaffe/config/powerpc/darwin/md.h:1.7	Fri Jul 16 16:20:54 2004
+++ kaffe/config/powerpc/darwin/md.h	Fri Jul 23 17:02:54 2004
@@ -53,6 +53,8 @@
 #define STACK_POINTER(scp) ((scp)->sc_sp)
 #endif
 
+#define DARWIN
+
 #include "kaffe-unix-stack.h"
 
 #endif
Index: kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c
diff -u kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.1 kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.2
--- kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.1	Sat Jul 17 07:57:30 2004
+++ kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c	Fri Jul 23 17:02:55 2004
@@ -927,7 +927,7 @@
 
 #define	CHECK_OUT_OF_MEMORY(P)	if ((P) == 0) return 0;
 
-#if defined(HAVE_SBRK)
+#if defined(HAVE_SBRK) && !defined(DARWIN)
 
 	/* Our primary choice for basic memory allocation is sbrk() which
 	 * should avoid any unsee space overheads.




More information about the kaffe mailing list