diff options
| author | Miles Bader | 2006-01-25 07:10:04 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-01-25 07:10:04 +0000 |
| commit | b2ba4dcba149f845bf7fcf15b6cede6a6cbcc336 (patch) | |
| tree | d9ca500b0501201584dbab3b74a83d1ba7e374c9 /src/alloc.c | |
| parent | 90fc2bc59774318b3db7c3642df00a1297f6b7ff (diff) | |
| parent | 7347faa822b5ea177df5b2ed7a2b7d79194f0bcc (diff) | |
| download | emacs-b2ba4dcba149f845bf7fcf15b6cede6a6cbcc336.tar.gz emacs-b2ba4dcba149f845bf7fcf15b6cede6a6cbcc336.zip | |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-7
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 4-14)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (base, patch 1-7)
- tag of miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187
- Update from CVS
- Merge from emacs--devo--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 187)
- Update from CVS
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 1ef8f97b040..48065382480 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1105,6 +1105,9 @@ lisp_align_free (block) | |||
| 1105 | } | 1105 | } |
| 1106 | eassert ((aligned & 1) == aligned); | 1106 | eassert ((aligned & 1) == aligned); |
| 1107 | eassert (i == (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1)); | 1107 | eassert (i == (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1)); |
| 1108 | #ifdef HAVE_POSIX_MEMALIGN | ||
| 1109 | eassert ((unsigned long)ABLOCKS_BASE (abase) % BLOCK_ALIGN == 0); | ||
| 1110 | #endif | ||
| 1108 | free (ABLOCKS_BASE (abase)); | 1111 | free (ABLOCKS_BASE (abase)); |
| 1109 | } | 1112 | } |
| 1110 | UNBLOCK_INPUT; | 1113 | UNBLOCK_INPUT; |
| @@ -1419,6 +1422,8 @@ make_interval () | |||
| 1419 | { | 1422 | { |
| 1420 | INTERVAL val; | 1423 | INTERVAL val; |
| 1421 | 1424 | ||
| 1425 | eassert (!handling_signal); | ||
| 1426 | |||
| 1422 | if (interval_free_list) | 1427 | if (interval_free_list) |
| 1423 | { | 1428 | { |
| 1424 | val = interval_free_list; | 1429 | val = interval_free_list; |
| @@ -1837,6 +1842,8 @@ allocate_string () | |||
| 1837 | { | 1842 | { |
| 1838 | struct Lisp_String *s; | 1843 | struct Lisp_String *s; |
| 1839 | 1844 | ||
| 1845 | eassert (!handling_signal); | ||
| 1846 | |||
| 1840 | /* If the free-list is empty, allocate a new string_block, and | 1847 | /* If the free-list is empty, allocate a new string_block, and |
| 1841 | add all the Lisp_Strings in it to the free-list. */ | 1848 | add all the Lisp_Strings in it to the free-list. */ |
| 1842 | if (string_free_list == NULL) | 1849 | if (string_free_list == NULL) |
| @@ -1971,6 +1978,8 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1971 | old_nbytes = GC_STRING_BYTES (s); | 1978 | old_nbytes = GC_STRING_BYTES (s); |
| 1972 | 1979 | ||
| 1973 | data = b->next_free; | 1980 | data = b->next_free; |
| 1981 | b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA); | ||
| 1982 | |||
| 1974 | data->string = s; | 1983 | data->string = s; |
| 1975 | s->data = SDATA_DATA (data); | 1984 | s->data = SDATA_DATA (data); |
| 1976 | #ifdef GC_CHECK_STRING_BYTES | 1985 | #ifdef GC_CHECK_STRING_BYTES |
| @@ -1983,7 +1992,6 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1983 | bcopy (string_overrun_cookie, (char *) data + needed, | 1992 | bcopy (string_overrun_cookie, (char *) data + needed, |
| 1984 | GC_STRING_OVERRUN_COOKIE_SIZE); | 1993 | GC_STRING_OVERRUN_COOKIE_SIZE); |
| 1985 | #endif | 1994 | #endif |
| 1986 | b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA); | ||
| 1987 | 1995 | ||
| 1988 | /* If S had already data assigned, mark that as free by setting its | 1996 | /* If S had already data assigned, mark that as free by setting its |
| 1989 | string back-pointer to null, and recording the size of the data | 1997 | string back-pointer to null, and recording the size of the data |
| @@ -2552,6 +2560,8 @@ make_float (float_value) | |||
| 2552 | { | 2560 | { |
| 2553 | register Lisp_Object val; | 2561 | register Lisp_Object val; |
| 2554 | 2562 | ||
| 2563 | eassert (!handling_signal); | ||
| 2564 | |||
| 2555 | if (float_free_list) | 2565 | if (float_free_list) |
| 2556 | { | 2566 | { |
| 2557 | /* We use the data field for chaining the free list | 2567 | /* We use the data field for chaining the free list |
| @@ -2671,6 +2681,8 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2671 | { | 2681 | { |
| 2672 | register Lisp_Object val; | 2682 | register Lisp_Object val; |
| 2673 | 2683 | ||
| 2684 | eassert (!handling_signal); | ||
| 2685 | |||
| 2674 | if (cons_free_list) | 2686 | if (cons_free_list) |
| 2675 | { | 2687 | { |
| 2676 | /* We use the cdr for chaining the free list | 2688 | /* We use the cdr for chaining the free list |
| @@ -2852,6 +2864,9 @@ allocate_vectorlike (len, type) | |||
| 2852 | UNBLOCK_INPUT; | 2864 | UNBLOCK_INPUT; |
| 2853 | #endif | 2865 | #endif |
| 2854 | 2866 | ||
| 2867 | /* This gets triggered by code which I haven't bothered to fix. --Stef */ | ||
| 2868 | /* eassert (!handling_signal); */ | ||
| 2869 | |||
| 2855 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; | 2870 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; |
| 2856 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); | 2871 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); |
| 2857 | 2872 | ||
| @@ -3102,6 +3117,8 @@ Its value and function definition are void, and its property list is nil. */) | |||
| 3102 | 3117 | ||
| 3103 | CHECK_STRING (name); | 3118 | CHECK_STRING (name); |
| 3104 | 3119 | ||
| 3120 | eassert (!handling_signal); | ||
| 3121 | |||
| 3105 | if (symbol_free_list) | 3122 | if (symbol_free_list) |
| 3106 | { | 3123 | { |
| 3107 | XSETSYMBOL (val, symbol_free_list); | 3124 | XSETSYMBOL (val, symbol_free_list); |
| @@ -3182,6 +3199,8 @@ allocate_misc () | |||
| 3182 | { | 3199 | { |
| 3183 | Lisp_Object val; | 3200 | Lisp_Object val; |
| 3184 | 3201 | ||
| 3202 | eassert (!handling_signal); | ||
| 3203 | |||
| 3185 | if (marker_free_list) | 3204 | if (marker_free_list) |
| 3186 | { | 3205 | { |
| 3187 | XSETMISC (val, marker_free_list); | 3206 | XSETMISC (val, marker_free_list); |