diff options
| author | Paul Eggert | 2011-05-30 22:45:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-05-30 22:45:07 -0700 |
| commit | 86f3178890f56cb408949e125d5d99e3124dd48f (patch) | |
| tree | a2c5f15751bbfe701d2f0da6fab0e0ea1fefc8ce /src/alloc.c | |
| parent | 12c69b84d1ab93d5b0bd189394952da12340f86d (diff) | |
| parent | b9627cfb1d5b5b0914525a19cd9edb06f91a1665 (diff) | |
| download | emacs-86f3178890f56cb408949e125d5d99e3124dd48f.tar.gz emacs-86f3178890f56cb408949e125d5d99e3124dd48f.zip | |
Merge from trunk.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/alloc.c b/src/alloc.c index be045be2ab4..6b901d5465e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -22,10 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <limits.h> /* For CHAR_BIT. */ | 22 | #include <limits.h> /* For CHAR_BIT. */ |
| 23 | #include <setjmp.h> | 23 | #include <setjmp.h> |
| 24 | 24 | ||
| 25 | #ifdef ALLOC_DEBUG | ||
| 26 | #undef INLINE | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #include <signal.h> | 25 | #include <signal.h> |
| 30 | 26 | ||
| 31 | #ifdef HAVE_GTK_AND_PTHREAD | 27 | #ifdef HAVE_GTK_AND_PTHREAD |
| @@ -408,7 +404,7 @@ static void mem_rotate_left (struct mem_node *); | |||
| 408 | static void mem_rotate_right (struct mem_node *); | 404 | static void mem_rotate_right (struct mem_node *); |
| 409 | static void mem_delete (struct mem_node *); | 405 | static void mem_delete (struct mem_node *); |
| 410 | static void mem_delete_fixup (struct mem_node *); | 406 | static void mem_delete_fixup (struct mem_node *); |
| 411 | static INLINE struct mem_node *mem_find (void *); | 407 | static inline struct mem_node *mem_find (void *); |
| 412 | 408 | ||
| 413 | 409 | ||
| 414 | #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS | 410 | #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS |
| @@ -3398,7 +3394,7 @@ mem_init (void) | |||
| 3398 | /* Value is a pointer to the mem_node containing START. Value is | 3394 | /* Value is a pointer to the mem_node containing START. Value is |
| 3399 | MEM_NIL if there is no node in the tree containing START. */ | 3395 | MEM_NIL if there is no node in the tree containing START. */ |
| 3400 | 3396 | ||
| 3401 | static INLINE struct mem_node * | 3397 | static inline struct mem_node * |
| 3402 | mem_find (void *start) | 3398 | mem_find (void *start) |
| 3403 | { | 3399 | { |
| 3404 | struct mem_node *p; | 3400 | struct mem_node *p; |
| @@ -3774,7 +3770,7 @@ mem_delete_fixup (struct mem_node *x) | |||
| 3774 | /* Value is non-zero if P is a pointer to a live Lisp string on | 3770 | /* Value is non-zero if P is a pointer to a live Lisp string on |
| 3775 | the heap. M is a pointer to the mem_block for P. */ | 3771 | the heap. M is a pointer to the mem_block for P. */ |
| 3776 | 3772 | ||
| 3777 | static INLINE int | 3773 | static inline int |
| 3778 | live_string_p (struct mem_node *m, void *p) | 3774 | live_string_p (struct mem_node *m, void *p) |
| 3779 | { | 3775 | { |
| 3780 | if (m->type == MEM_TYPE_STRING) | 3776 | if (m->type == MEM_TYPE_STRING) |
| @@ -3797,7 +3793,7 @@ live_string_p (struct mem_node *m, void *p) | |||
| 3797 | /* Value is non-zero if P is a pointer to a live Lisp cons on | 3793 | /* Value is non-zero if P is a pointer to a live Lisp cons on |
| 3798 | the heap. M is a pointer to the mem_block for P. */ | 3794 | the heap. M is a pointer to the mem_block for P. */ |
| 3799 | 3795 | ||
| 3800 | static INLINE int | 3796 | static inline int |
| 3801 | live_cons_p (struct mem_node *m, void *p) | 3797 | live_cons_p (struct mem_node *m, void *p) |
| 3802 | { | 3798 | { |
| 3803 | if (m->type == MEM_TYPE_CONS) | 3799 | if (m->type == MEM_TYPE_CONS) |
| @@ -3823,7 +3819,7 @@ live_cons_p (struct mem_node *m, void *p) | |||
| 3823 | /* Value is non-zero if P is a pointer to a live Lisp symbol on | 3819 | /* Value is non-zero if P is a pointer to a live Lisp symbol on |
| 3824 | the heap. M is a pointer to the mem_block for P. */ | 3820 | the heap. M is a pointer to the mem_block for P. */ |
| 3825 | 3821 | ||
| 3826 | static INLINE int | 3822 | static inline int |
| 3827 | live_symbol_p (struct mem_node *m, void *p) | 3823 | live_symbol_p (struct mem_node *m, void *p) |
| 3828 | { | 3824 | { |
| 3829 | if (m->type == MEM_TYPE_SYMBOL) | 3825 | if (m->type == MEM_TYPE_SYMBOL) |
| @@ -3849,7 +3845,7 @@ live_symbol_p (struct mem_node *m, void *p) | |||
| 3849 | /* Value is non-zero if P is a pointer to a live Lisp float on | 3845 | /* Value is non-zero if P is a pointer to a live Lisp float on |
| 3850 | the heap. M is a pointer to the mem_block for P. */ | 3846 | the heap. M is a pointer to the mem_block for P. */ |
| 3851 | 3847 | ||
| 3852 | static INLINE int | 3848 | static inline int |
| 3853 | live_float_p (struct mem_node *m, void *p) | 3849 | live_float_p (struct mem_node *m, void *p) |
| 3854 | { | 3850 | { |
| 3855 | if (m->type == MEM_TYPE_FLOAT) | 3851 | if (m->type == MEM_TYPE_FLOAT) |
| @@ -3873,7 +3869,7 @@ live_float_p (struct mem_node *m, void *p) | |||
| 3873 | /* Value is non-zero if P is a pointer to a live Lisp Misc on | 3869 | /* Value is non-zero if P is a pointer to a live Lisp Misc on |
| 3874 | the heap. M is a pointer to the mem_block for P. */ | 3870 | the heap. M is a pointer to the mem_block for P. */ |
| 3875 | 3871 | ||
| 3876 | static INLINE int | 3872 | static inline int |
| 3877 | live_misc_p (struct mem_node *m, void *p) | 3873 | live_misc_p (struct mem_node *m, void *p) |
| 3878 | { | 3874 | { |
| 3879 | if (m->type == MEM_TYPE_MISC) | 3875 | if (m->type == MEM_TYPE_MISC) |
| @@ -3899,7 +3895,7 @@ live_misc_p (struct mem_node *m, void *p) | |||
| 3899 | /* Value is non-zero if P is a pointer to a live vector-like object. | 3895 | /* Value is non-zero if P is a pointer to a live vector-like object. |
| 3900 | M is a pointer to the mem_block for P. */ | 3896 | M is a pointer to the mem_block for P. */ |
| 3901 | 3897 | ||
| 3902 | static INLINE int | 3898 | static inline int |
| 3903 | live_vector_p (struct mem_node *m, void *p) | 3899 | live_vector_p (struct mem_node *m, void *p) |
| 3904 | { | 3900 | { |
| 3905 | return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); | 3901 | return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); |
| @@ -3909,7 +3905,7 @@ live_vector_p (struct mem_node *m, void *p) | |||
| 3909 | /* Value is non-zero if P is a pointer to a live buffer. M is a | 3905 | /* Value is non-zero if P is a pointer to a live buffer. M is a |
| 3910 | pointer to the mem_block for P. */ | 3906 | pointer to the mem_block for P. */ |
| 3911 | 3907 | ||
| 3912 | static INLINE int | 3908 | static inline int |
| 3913 | live_buffer_p (struct mem_node *m, void *p) | 3909 | live_buffer_p (struct mem_node *m, void *p) |
| 3914 | { | 3910 | { |
| 3915 | /* P must point to the start of the block, and the buffer | 3911 | /* P must point to the start of the block, and the buffer |
| @@ -3975,7 +3971,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", | |||
| 3975 | 3971 | ||
| 3976 | /* Mark OBJ if we can prove it's a Lisp_Object. */ | 3972 | /* Mark OBJ if we can prove it's a Lisp_Object. */ |
| 3977 | 3973 | ||
| 3978 | static INLINE void | 3974 | static inline void |
| 3979 | mark_maybe_object (Lisp_Object obj) | 3975 | mark_maybe_object (Lisp_Object obj) |
| 3980 | { | 3976 | { |
| 3981 | void *po; | 3977 | void *po; |
| @@ -4044,7 +4040,7 @@ mark_maybe_object (Lisp_Object obj) | |||
| 4044 | /* If P points to Lisp data, mark that as live if it isn't already | 4040 | /* If P points to Lisp data, mark that as live if it isn't already |
| 4045 | marked. */ | 4041 | marked. */ |
| 4046 | 4042 | ||
| 4047 | static INLINE void | 4043 | static inline void |
| 4048 | mark_maybe_pointer (void *p) | 4044 | mark_maybe_pointer (void *p) |
| 4049 | { | 4045 | { |
| 4050 | struct mem_node *m; | 4046 | struct mem_node *m; |