aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorKenichi Handa2012-10-06 21:55:09 +0900
committerKenichi Handa2012-10-06 21:55:09 +0900
commit16ddec7e9e6adcf615db097d9627d490ca29208c (patch)
tree1c16b9565c9cca81ec8f5b10f0f4110340d4654a /src/alloc.c
parent2b89bca49d55cec1a004353354a76de2972c68f3 (diff)
parentd5acb99a199d83cde1a43482709c3e9d4ec34b2f (diff)
downloademacs-16ddec7e9e6adcf615db097d9627d490ca29208c.tar.gz
emacs-16ddec7e9e6adcf615db097d9627d490ca29208c.zip
merge trunk
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/alloc.c b/src/alloc.c
index df166b4924a..3ed8cc2d990 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -74,6 +74,7 @@ extern void *sbrk ();
74#endif 74#endif
75#ifdef WINDOWSNT 75#ifdef WINDOWSNT
76#include "w32.h" 76#include "w32.h"
77#include "w32heap.h" /* for sbrk */
77#endif 78#endif
78 79
79#ifdef DOUG_LEA_MALLOC 80#ifdef DOUG_LEA_MALLOC
@@ -354,7 +355,7 @@ static void mem_rotate_left (struct mem_node *);
354static void mem_rotate_right (struct mem_node *); 355static void mem_rotate_right (struct mem_node *);
355static void mem_delete (struct mem_node *); 356static void mem_delete (struct mem_node *);
356static void mem_delete_fixup (struct mem_node *); 357static void mem_delete_fixup (struct mem_node *);
357static inline struct mem_node *mem_find (void *); 358static struct mem_node *mem_find (void *);
358#endif 359#endif
359 360
360 361
@@ -3549,7 +3550,7 @@ mem_init (void)
3549/* Value is a pointer to the mem_node containing START. Value is 3550/* Value is a pointer to the mem_node containing START. Value is
3550 MEM_NIL if there is no node in the tree containing START. */ 3551 MEM_NIL if there is no node in the tree containing START. */
3551 3552
3552static inline struct mem_node * 3553static struct mem_node *
3553mem_find (void *start) 3554mem_find (void *start)
3554{ 3555{
3555 struct mem_node *p; 3556 struct mem_node *p;
@@ -3925,7 +3926,7 @@ mem_delete_fixup (struct mem_node *x)
3925/* Value is non-zero if P is a pointer to a live Lisp string on 3926/* Value is non-zero if P is a pointer to a live Lisp string on
3926 the heap. M is a pointer to the mem_block for P. */ 3927 the heap. M is a pointer to the mem_block for P. */
3927 3928
3928static inline bool 3929static bool
3929live_string_p (struct mem_node *m, void *p) 3930live_string_p (struct mem_node *m, void *p)
3930{ 3931{
3931 if (m->type == MEM_TYPE_STRING) 3932 if (m->type == MEM_TYPE_STRING)
@@ -3948,7 +3949,7 @@ live_string_p (struct mem_node *m, void *p)
3948/* Value is non-zero if P is a pointer to a live Lisp cons on 3949/* Value is non-zero if P is a pointer to a live Lisp cons on
3949 the heap. M is a pointer to the mem_block for P. */ 3950 the heap. M is a pointer to the mem_block for P. */
3950 3951
3951static inline bool 3952static bool
3952live_cons_p (struct mem_node *m, void *p) 3953live_cons_p (struct mem_node *m, void *p)
3953{ 3954{
3954 if (m->type == MEM_TYPE_CONS) 3955 if (m->type == MEM_TYPE_CONS)
@@ -3974,7 +3975,7 @@ live_cons_p (struct mem_node *m, void *p)
3974/* Value is non-zero if P is a pointer to a live Lisp symbol on 3975/* Value is non-zero if P is a pointer to a live Lisp symbol on
3975 the heap. M is a pointer to the mem_block for P. */ 3976 the heap. M is a pointer to the mem_block for P. */
3976 3977
3977static inline bool 3978static bool
3978live_symbol_p (struct mem_node *m, void *p) 3979live_symbol_p (struct mem_node *m, void *p)
3979{ 3980{
3980 if (m->type == MEM_TYPE_SYMBOL) 3981 if (m->type == MEM_TYPE_SYMBOL)
@@ -4000,7 +4001,7 @@ live_symbol_p (struct mem_node *m, void *p)
4000/* Value is non-zero if P is a pointer to a live Lisp float on 4001/* Value is non-zero if P is a pointer to a live Lisp float on
4001 the heap. M is a pointer to the mem_block for P. */ 4002 the heap. M is a pointer to the mem_block for P. */
4002 4003
4003static inline bool 4004static bool
4004live_float_p (struct mem_node *m, void *p) 4005live_float_p (struct mem_node *m, void *p)
4005{ 4006{
4006 if (m->type == MEM_TYPE_FLOAT) 4007 if (m->type == MEM_TYPE_FLOAT)
@@ -4024,7 +4025,7 @@ live_float_p (struct mem_node *m, void *p)
4024/* Value is non-zero if P is a pointer to a live Lisp Misc on 4025/* Value is non-zero if P is a pointer to a live Lisp Misc on
4025 the heap. M is a pointer to the mem_block for P. */ 4026 the heap. M is a pointer to the mem_block for P. */
4026 4027
4027static inline bool 4028static bool
4028live_misc_p (struct mem_node *m, void *p) 4029live_misc_p (struct mem_node *m, void *p)
4029{ 4030{
4030 if (m->type == MEM_TYPE_MISC) 4031 if (m->type == MEM_TYPE_MISC)
@@ -4050,7 +4051,7 @@ live_misc_p (struct mem_node *m, void *p)
4050/* Value is non-zero if P is a pointer to a live vector-like object. 4051/* Value is non-zero if P is a pointer to a live vector-like object.
4051 M is a pointer to the mem_block for P. */ 4052 M is a pointer to the mem_block for P. */
4052 4053
4053static inline bool 4054static bool
4054live_vector_p (struct mem_node *m, void *p) 4055live_vector_p (struct mem_node *m, void *p)
4055{ 4056{
4056 if (m->type == MEM_TYPE_VECTOR_BLOCK) 4057 if (m->type == MEM_TYPE_VECTOR_BLOCK)
@@ -4086,7 +4087,7 @@ live_vector_p (struct mem_node *m, void *p)
4086/* Value is non-zero if P is a pointer to a live buffer. M is a 4087/* Value is non-zero if P is a pointer to a live buffer. M is a
4087 pointer to the mem_block for P. */ 4088 pointer to the mem_block for P. */
4088 4089
4089static inline bool 4090static bool
4090live_buffer_p (struct mem_node *m, void *p) 4091live_buffer_p (struct mem_node *m, void *p)
4091{ 4092{
4092 /* P must point to the start of the block, and the buffer 4093 /* P must point to the start of the block, and the buffer
@@ -4152,7 +4153,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
4152 4153
4153/* Mark OBJ if we can prove it's a Lisp_Object. */ 4154/* Mark OBJ if we can prove it's a Lisp_Object. */
4154 4155
4155static inline void 4156static void
4156mark_maybe_object (Lisp_Object obj) 4157mark_maybe_object (Lisp_Object obj)
4157{ 4158{
4158 void *po; 4159 void *po;
@@ -4221,7 +4222,7 @@ mark_maybe_object (Lisp_Object obj)
4221/* If P points to Lisp data, mark that as live if it isn't already 4222/* If P points to Lisp data, mark that as live if it isn't already
4222 marked. */ 4223 marked. */
4223 4224
4224static inline void 4225static void
4225mark_maybe_pointer (void *p) 4226mark_maybe_pointer (void *p)
4226{ 4227{
4227 struct mem_node *m; 4228 struct mem_node *m;
@@ -5051,7 +5052,7 @@ inhibit_garbage_collection (void)
5051/* Used to avoid possible overflows when 5052/* Used to avoid possible overflows when
5052 converting from C to Lisp integers. */ 5053 converting from C to Lisp integers. */
5053 5054
5054static inline Lisp_Object 5055static Lisp_Object
5055bounded_number (EMACS_INT number) 5056bounded_number (EMACS_INT number)
5056{ 5057{
5057 return make_number (min (MOST_POSITIVE_FIXNUM, number)); 5058 return make_number (min (MOST_POSITIVE_FIXNUM, number));
@@ -6607,7 +6608,8 @@ The time is in seconds as a floating point value. */);
6607/* When compiled with GCC, GDB might say "No enum type named 6608/* When compiled with GCC, GDB might say "No enum type named
6608 pvec_type" if we don't have at least one symbol with that type, and 6609 pvec_type" if we don't have at least one symbol with that type, and
6609 then xbacktrace could fail. Similarly for the other enums and 6610 then xbacktrace could fail. Similarly for the other enums and
6610 their values. */ 6611 their values. Some non-GCC compilers don't like these constructs. */
6612#ifdef __GNUC__
6611union 6613union
6612{ 6614{
6613 enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS; 6615 enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS;
@@ -6627,3 +6629,4 @@ union
6627 enum lsb_bits lsb_bits; 6629 enum lsb_bits lsb_bits;
6628#endif 6630#endif
6629} const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0}; 6631} const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0};
6632#endif /* __GNUC__ */