diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/alloc.c b/src/alloc.c index 7fa05e54202..c0d68e6c964 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -150,8 +150,6 @@ union emacs_align_type | |||
| 150 | { | 150 | { |
| 151 | struct frame frame; | 151 | struct frame frame; |
| 152 | struct Lisp_Bignum Lisp_Bignum; | 152 | struct Lisp_Bignum Lisp_Bignum; |
| 153 | struct Lisp_Bool_Vector Lisp_Bool_Vector; | ||
| 154 | struct Lisp_Char_Table Lisp_Char_Table; | ||
| 155 | struct Lisp_CondVar Lisp_CondVar; | 153 | struct Lisp_CondVar Lisp_CondVar; |
| 156 | struct Lisp_Finalizer Lisp_Finalizer; | 154 | struct Lisp_Finalizer Lisp_Finalizer; |
| 157 | struct Lisp_Float Lisp_Float; | 155 | struct Lisp_Float Lisp_Float; |
| @@ -160,21 +158,25 @@ union emacs_align_type | |||
| 160 | struct Lisp_Misc_Ptr Lisp_Misc_Ptr; | 158 | struct Lisp_Misc_Ptr Lisp_Misc_Ptr; |
| 161 | struct Lisp_Mutex Lisp_Mutex; | 159 | struct Lisp_Mutex Lisp_Mutex; |
| 162 | struct Lisp_Overlay Lisp_Overlay; | 160 | struct Lisp_Overlay Lisp_Overlay; |
| 163 | struct Lisp_Sub_Char_Table Lisp_Sub_Char_Table; | ||
| 164 | struct Lisp_Subr Lisp_Subr; | 161 | struct Lisp_Subr Lisp_Subr; |
| 165 | struct Lisp_Sqlite Lisp_Sqlite; | 162 | struct Lisp_Sqlite Lisp_Sqlite; |
| 166 | struct Lisp_User_Ptr Lisp_User_Ptr; | 163 | struct Lisp_User_Ptr Lisp_User_Ptr; |
| 167 | struct Lisp_Vector Lisp_Vector; | ||
| 168 | struct terminal terminal; | 164 | struct terminal terminal; |
| 169 | struct thread_state thread_state; | 165 | struct thread_state thread_state; |
| 170 | struct window window; | 166 | struct window window; |
| 171 | 167 | ||
| 172 | /* Omit the following since they would require including process.h | 168 | /* Omit the following since they would require including process.h |
| 173 | etc. In practice their alignments never exceed that of the | 169 | etc, or because they are defined with flexible array members, which |
| 174 | structs already listed. */ | 170 | are rejected by some C99 compilers when this union subsequently |
| 171 | appears in an `alignof' expression. In practice their alignments | ||
| 172 | never exceed that of the structs already listed. */ | ||
| 175 | #if 0 | 173 | #if 0 |
| 174 | struct Lisp_Bool_Vector Lisp_Bool_Vector; | ||
| 175 | struct Lisp_Char_Table Lisp_Char_Table; | ||
| 176 | struct Lisp_Sub_Char_Table Lisp_Sub_Char_Table; | ||
| 176 | struct Lisp_Module_Function Lisp_Module_Function; | 177 | struct Lisp_Module_Function Lisp_Module_Function; |
| 177 | struct Lisp_Process Lisp_Process; | 178 | struct Lisp_Process Lisp_Process; |
| 179 | struct Lisp_Vector Lisp_Vector; | ||
| 178 | struct save_window_data save_window_data; | 180 | struct save_window_data save_window_data; |
| 179 | struct scroll_bar scroll_bar; | 181 | struct scroll_bar scroll_bar; |
| 180 | struct xwidget_view xwidget_view; | 182 | struct xwidget_view xwidget_view; |
| @@ -5167,14 +5169,20 @@ mark_memory (void const *start, void const *end) | |||
| 5167 | for (pp = start; (void const *) pp < end; pp += GC_POINTER_ALIGNMENT) | 5169 | for (pp = start; (void const *) pp < end; pp += GC_POINTER_ALIGNMENT) |
| 5168 | { | 5170 | { |
| 5169 | void *p = *(void *const *) pp; | 5171 | void *p = *(void *const *) pp; |
| 5172 | intptr_t ip; | ||
| 5173 | |||
| 5174 | #if !USE_LSB_TAG && !defined WIDE_EMACS_INT | ||
| 5175 | ip = (intptr_t) p; | ||
| 5176 | mark_maybe_pointer ((void *) (ip & VALMASK), false); | ||
| 5177 | #else /* USE_LSB_TAG || WIDE_EMACS_INT */ | ||
| 5170 | mark_maybe_pointer (p, false); | 5178 | mark_maybe_pointer (p, false); |
| 5179 | #endif /* USE_LSB_TAG || WIDE_EMACS_INT */ | ||
| 5171 | 5180 | ||
| 5172 | /* Unmask any struct Lisp_Symbol pointer that make_lisp_symbol | 5181 | /* Unmask any struct Lisp_Symbol pointer that make_lisp_symbol |
| 5173 | previously disguised by adding the address of 'lispsym'. | 5182 | previously disguised by adding the address of 'lispsym'. |
| 5174 | On a host with 32-bit pointers and 64-bit Lisp_Objects, | 5183 | On a host with 32-bit pointers and 64-bit Lisp_Objects, |
| 5175 | a Lisp_Object might be split into registers saved into | 5184 | a Lisp_Object might be split into registers saved into |
| 5176 | non-adjacent words and P might be the low-order word's value. */ | 5185 | non-adjacent words and P might be the low-order word's value. */ |
| 5177 | intptr_t ip; | ||
| 5178 | ckd_add (&ip, (intptr_t) p, (intptr_t) lispsym); | 5186 | ckd_add (&ip, (intptr_t) p, (intptr_t) lispsym); |
| 5179 | mark_maybe_pointer ((void *) ip, true); | 5187 | mark_maybe_pointer ((void *) ip, true); |
| 5180 | } | 5188 | } |