Emacs 21 for Mac OS X
Latest News, FAQ, Files, Links, and other Resources.
Latest News

Introduction

Obtaining and Building Emacs

FAQ

Resources


Emacs Home Page

Emacs Project Page on Savannah

Emacs for Mac OS Classic Project Page


My OS X Programming Blog

    This is Emacs 21's Mac OS X maintainer's web page.

Garbage Collection Problem Fixed

Sunday, October 12, 2003

If you've updated and built Emacs from CVS on OS X within the past few weeks, you may have experienced crashes while Emacs is doing garbage collection. The following patch, just checked into CVS, solves the problem. I highly recommend updating to include it.

Index: darwin.h
===================================================================
RCS file: /cvs/emacs/src/s/darwin.h,v
retrieving revision 1.12
diff -r1.12 darwin.h
319a320,323
> /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
>    stack.  */
> #define GC_MARK_STACK   GC_MAKE_GCPROS_NOOPS
> 

The problem is caused by a change to src/alloc.c about a month ago that causes garbage collection to crash under certain circumstances (when LISP_INT values are on the gcprolist) if GC_MARK_STACK is set to GC_USE_GCPROS_AS_BEFORE. The best way to fix the problem is probably to fix the bug introduced. I don't want to work on that. Instead I have now set GC_MARK_STACK to GC_MAKE_GCPROS_NOOPS. This option for GC has been chosen on nearly all other platforms. So by following suit on OS X, we may actually be using better-maintained code in the future. This is probably a better solution.

October 2003
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Sep  Nov


Copyright © 2003 Andrew Choi <akochoi-emacs at shaw.ca> Created with
BlogMax
emacs Made on a Mac