author | Camm Maguire <camm@debian.org> | 2005年01月16日 02:29:09 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2005年01月16日 02:29:09 +0000 |
commit | 30fe202df01e498b131e8af7f0e25cf6ffc979e5 (patch) | |
tree | ec07722fb161d01c3d26265e85414fb8927b10fc | |
parent | c7eb60be8c9ea33ce093589fda4a443a23f5093e (diff) | |
download | gcl-Version_2_6_6pre.tar.gz |
-rw-r--r-- | gcl/debian/changelog | 3 | ||||
-rw-r--r-- | gcl/o/alloc.c | 16 |
diff --git a/gcl/debian/changelog b/gcl/debian/changelog index 9439a434f..b68adc2f6 100644 --- a/gcl/debian/changelog +++ b/gcl/debian/changelog @@ -22,8 +22,9 @@ gcl (2.6.6-1) unstable; urgency=high * Fix fixnum print bug on 64bit * Fix nil types in room report * 64bit fixes to fixnum_add and fixnum_sub + * Fix Mac SGC/save bug, at least in part - -- Camm Maguire <camm@enhanced.com> 2005年1月16日 00:35:53 +0000 + -- Camm Maguire <camm@enhanced.com> 2005年1月16日 02:28:50 +0000 gcl (2.6.5-1) unstable; urgency=high diff --git a/gcl/o/alloc.c b/gcl/o/alloc.c index af51c2007..007fe80b1 100644 --- a/gcl/o/alloc.c +++ b/gcl/o/alloc.c @@ -824,6 +824,15 @@ init_tm(enum type t, char *name, int elsize, int nelts, int sgc,int distinct) { } +/* FIXME this is a work-around for the special MacOSX memory + initialization sequence, which sets heap_end, traditionally + initialized in gcl_init_alloc. Mac and windows have non-std + sbrk-emulating memory subsystems, and their internals need to be + homogenized and integrated into the traditional unix sequence for + simplicity. set_maxpage is overloaded, and the positioning of its + call is too fragile. 20050115 CM*/ +static int gcl_alloc_initialized; + void set_maxpage(void) { @@ -832,7 +841,7 @@ set_maxpage(void) { #ifdef SGC page_multiple=getpagesize()/PAGESIZE; if (page_multiple==0) error("PAGESIZE must be factor of getpagesize()"); - if (heap_end) { + if (gcl_alloc_initialized) { extern long maxpage; maxpage=page(heap_end); memory_protect(sgc_enabled ? 1 : 0); @@ -854,14 +863,12 @@ void gcl_init_alloc(void) { long i; - static int initialized; #ifdef GCL_GPROF extern void *GCL_GPROF_START; unsigned textpage=2*((void *)&etext-(void *)&GCL_GPROF_START)/PAGESIZE; #endif - if (initialized) return; - initialized=1; + if (gcl_alloc_initialized) return; #ifdef BSD @@ -985,6 +992,7 @@ gcl_init_alloc(void) { if (maxcbpage<textpage) maxcbpage=textpage; #endif + gcl_alloc_initialized=1; } |