aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 8215cc53cd3..e627af6c071 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 *);
408static void mem_rotate_right (struct mem_node *); 404static void mem_rotate_right (struct mem_node *);
409static void mem_delete (struct mem_node *); 405static void mem_delete (struct mem_node *);
410static void mem_delete_fixup (struct mem_node *); 406static void mem_delete_fixup (struct mem_node *);
411static INLINE struct mem_node *mem_find (void *); 407static 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
@@ -3374,7 +3370,7 @@ mem_init (void)
3374/* Value is a pointer to the mem_node containing START. Value is 3370/* Value is a pointer to the mem_node containing START. Value is
3375 MEM_NIL if there is no node in the tree containing START. */ 3371 MEM_NIL if there is no node in the tree containing START. */
3376 3372
3377static INLINE struct mem_node * 3373static inline struct mem_node *
3378mem_find (void *start) 3374mem_find (void *start)
3379{ 3375{
3380 struct mem_node *p; 3376 struct mem_node *p;
@@ -3750,7 +3746,7 @@ mem_delete_fixup (struct mem_node *x)
3750/* Value is non-zero if P is a pointer to a live Lisp string on 3746/* Value is non-zero if P is a pointer to a live Lisp string on
3751 the heap. M is a pointer to the mem_block for P. */ 3747 the heap. M is a pointer to the mem_block for P. */
3752 3748
3753static INLINE int 3749static inline int
3754live_string_p (struct mem_node *m, void *p) 3750live_string_p (struct mem_node *m, void *p)
3755{ 3751{
3756 if (m->type == MEM_TYPE_STRING) 3752 if (m->type == MEM_TYPE_STRING)
@@ -3773,7 +3769,7 @@ live_string_p (struct mem_node *m, void *p)
3773/* Value is non-zero if P is a pointer to a live Lisp cons on 3769/* Value is non-zero if P is a pointer to a live Lisp cons on
3774 the heap. M is a pointer to the mem_block for P. */ 3770 the heap. M is a pointer to the mem_block for P. */
3775 3771
3776static INLINE int 3772static inline int
3777live_cons_p (struct mem_node *m, void *p) 3773live_cons_p (struct mem_node *m, void *p)
3778{ 3774{
3779 if (m->type == MEM_TYPE_CONS) 3775 if (m->type == MEM_TYPE_CONS)
@@ -3799,7 +3795,7 @@ live_cons_p (struct mem_node *m, void *p)
3799/* Value is non-zero if P is a pointer to a live Lisp symbol on 3795/* Value is non-zero if P is a pointer to a live Lisp symbol on
3800 the heap. M is a pointer to the mem_block for P. */ 3796 the heap. M is a pointer to the mem_block for P. */
3801 3797
3802static INLINE int 3798static inline int
3803live_symbol_p (struct mem_node *m, void *p) 3799live_symbol_p (struct mem_node *m, void *p)
3804{ 3800{
3805 if (m->type == MEM_TYPE_SYMBOL) 3801 if (m->type == MEM_TYPE_SYMBOL)
@@ -3825,7 +3821,7 @@ live_symbol_p (struct mem_node *m, void *p)
3825/* Value is non-zero if P is a pointer to a live Lisp float on 3821/* Value is non-zero if P is a pointer to a live Lisp float on
3826 the heap. M is a pointer to the mem_block for P. */ 3822 the heap. M is a pointer to the mem_block for P. */
3827 3823
3828static INLINE int 3824static inline int
3829live_float_p (struct mem_node *m, void *p) 3825live_float_p (struct mem_node *m, void *p)
3830{ 3826{
3831 if (m->type == MEM_TYPE_FLOAT) 3827 if (m->type == MEM_TYPE_FLOAT)
@@ -3849,7 +3845,7 @@ live_float_p (struct mem_node *m, void *p)
3849/* Value is non-zero if P is a pointer to a live Lisp Misc on 3845/* Value is non-zero if P is a pointer to a live Lisp Misc 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
3852static INLINE int 3848static inline int
3853live_misc_p (struct mem_node *m, void *p) 3849live_misc_p (struct mem_node *m, void *p)
3854{ 3850{
3855 if (m->type == MEM_TYPE_MISC) 3851 if (m->type == MEM_TYPE_MISC)
@@ -3875,7 +3871,7 @@ live_misc_p (struct mem_node *m, void *p)
3875/* Value is non-zero if P is a pointer to a live vector-like object. 3871/* Value is non-zero if P is a pointer to a live vector-like object.
3876 M is a pointer to the mem_block for P. */ 3872 M is a pointer to the mem_block for P. */
3877 3873
3878static INLINE int 3874static inline int
3879live_vector_p (struct mem_node *m, void *p) 3875live_vector_p (struct mem_node *m, void *p)
3880{ 3876{
3881 return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); 3877 return (p == m->start && m->type == MEM_TYPE_VECTORLIKE);
@@ -3885,7 +3881,7 @@ live_vector_p (struct mem_node *m, void *p)
3885/* Value is non-zero if P is a pointer to a live buffer. M is a 3881/* Value is non-zero if P is a pointer to a live buffer. M is a
3886 pointer to the mem_block for P. */ 3882 pointer to the mem_block for P. */
3887 3883
3888static INLINE int 3884static inline int
3889live_buffer_p (struct mem_node *m, void *p) 3885live_buffer_p (struct mem_node *m, void *p)
3890{ 3886{
3891 /* P must point to the start of the block, and the buffer 3887 /* P must point to the start of the block, and the buffer
@@ -3951,7 +3947,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
3951 3947
3952/* Mark OBJ if we can prove it's a Lisp_Object. */ 3948/* Mark OBJ if we can prove it's a Lisp_Object. */
3953 3949
3954static INLINE void 3950static inline void
3955mark_maybe_object (Lisp_Object obj) 3951mark_maybe_object (Lisp_Object obj)
3956{ 3952{
3957 void *po; 3953 void *po;
@@ -4020,7 +4016,7 @@ mark_maybe_object (Lisp_Object obj)
4020/* If P points to Lisp data, mark that as live if it isn't already 4016/* If P points to Lisp data, mark that as live if it isn't already
4021 marked. */ 4017 marked. */
4022 4018
4023static INLINE void 4019static inline void
4024mark_maybe_pointer (void *p) 4020mark_maybe_pointer (void *p)
4025{ 4021{
4026 struct mem_node *m; 4022 struct mem_node *m;