diff options
| author | Kenichi Handa | 2012-10-06 21:55:09 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-10-06 21:55:09 +0900 |
| commit | 16ddec7e9e6adcf615db097d9627d490ca29208c (patch) | |
| tree | 1c16b9565c9cca81ec8f5b10f0f4110340d4654a /src/alloc.c | |
| parent | 2b89bca49d55cec1a004353354a76de2972c68f3 (diff) | |
| parent | d5acb99a199d83cde1a43482709c3e9d4ec34b2f (diff) | |
| download | emacs-16ddec7e9e6adcf615db097d9627d490ca29208c.tar.gz emacs-16ddec7e9e6adcf615db097d9627d490ca29208c.zip | |
merge trunk
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 29 |
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 *); | |||
| 354 | static void mem_rotate_right (struct mem_node *); | 355 | static void mem_rotate_right (struct mem_node *); |
| 355 | static void mem_delete (struct mem_node *); | 356 | static void mem_delete (struct mem_node *); |
| 356 | static void mem_delete_fixup (struct mem_node *); | 357 | static void mem_delete_fixup (struct mem_node *); |
| 357 | static inline struct mem_node *mem_find (void *); | 358 | static 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 | ||
| 3552 | static inline struct mem_node * | 3553 | static struct mem_node * |
| 3553 | mem_find (void *start) | 3554 | mem_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 | ||
| 3928 | static inline bool | 3929 | static bool |
| 3929 | live_string_p (struct mem_node *m, void *p) | 3930 | live_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 | ||
| 3951 | static inline bool | 3952 | static bool |
| 3952 | live_cons_p (struct mem_node *m, void *p) | 3953 | live_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 | ||
| 3977 | static inline bool | 3978 | static bool |
| 3978 | live_symbol_p (struct mem_node *m, void *p) | 3979 | live_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 | ||
| 4003 | static inline bool | 4004 | static bool |
| 4004 | live_float_p (struct mem_node *m, void *p) | 4005 | live_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 | ||
| 4027 | static inline bool | 4028 | static bool |
| 4028 | live_misc_p (struct mem_node *m, void *p) | 4029 | live_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 | ||
| 4053 | static inline bool | 4054 | static bool |
| 4054 | live_vector_p (struct mem_node *m, void *p) | 4055 | live_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 | ||
| 4089 | static inline bool | 4090 | static bool |
| 4090 | live_buffer_p (struct mem_node *m, void *p) | 4091 | live_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 | ||
| 4155 | static inline void | 4156 | static void |
| 4156 | mark_maybe_object (Lisp_Object obj) | 4157 | mark_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 | ||
| 4224 | static inline void | 4225 | static void |
| 4225 | mark_maybe_pointer (void *p) | 4226 | mark_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 | ||
| 5054 | static inline Lisp_Object | 5055 | static Lisp_Object |
| 5055 | bounded_number (EMACS_INT number) | 5056 | bounded_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__ | ||
| 6611 | union | 6613 | union |
| 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__ */ | ||