Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 4933:77e3b19bd245
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 24 Jan 2010 22:06:20 -0600 |
parents | ae81a2c00f4f |
children | 6ef8256a020a 714f7c9fabb1 |
comparison
equal
deleted
inserted
replaced
4883:f730384b8ddf | 4933:77e3b19bd245 |
---|---|
1 /* Storage allocation and gc for XEmacs Lisp interpreter. | 1 /* Storage allocation and gc for XEmacs Lisp interpreter. |
2 Copyright (C) 1985-1998 Free Software Foundation, Inc. | 2 Copyright (C) 1985-1998 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Sun Microsystems, Inc. | 3 Copyright (C) 1995 Sun Microsystems, Inc. |
4 Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005 Ben Wing. | 4 Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2010 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
3114 struct free_lcrecord_header *free_header = | 3114 struct free_lcrecord_header *free_header = |
3115 (struct free_lcrecord_header *) XPNTR (lcrecord); | 3115 (struct free_lcrecord_header *) XPNTR (lcrecord); |
3116 struct lrecord_header *lheader = &free_header->lcheader.lheader; | 3116 struct lrecord_header *lheader = &free_header->lcheader.lheader; |
3117 const struct lrecord_implementation *implementation | 3117 const struct lrecord_implementation *implementation |
3118 = LHEADER_IMPLEMENTATION (lheader); | 3118 = LHEADER_IMPLEMENTATION (lheader); |
3119 | |
3120 /* If we try to debug-print during GC, we'll likely get a crash on the | |
3121 following assert (called from Lstream_delete(), from prin1_to_string()). | |
3122 Instead, just don't do anything. Worst comes to worst, we have a | |
3123 small memory leak -- and programs being debugged usually won't be | |
3124 super long-lived afterwards, anyway. */ | |
3125 if (gc_in_progress && in_debug_print) | |
3126 return; | |
3119 | 3127 |
3120 /* Finalizer methods may try to free objects within them, which typically | 3128 /* Finalizer methods may try to free objects within them, which typically |
3121 won't be marked and thus are scheduled for demolition. Putting them | 3129 won't be marked and thus are scheduled for demolition. Putting them |
3122 on the free list would be very bad, as we'd have xfree()d memory in | 3130 on the free list would be very bad, as we'd have xfree()d memory in |
3123 the list. Even if for some reason the objects are still live | 3131 the list. Even if for some reason the objects are still live |