aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 15:31:22 -0700
committerPaul Eggert2011-03-15 15:31:22 -0700
commit7bc26fdb5c3b50b29bff966a55394e730fbfadd8 (patch)
tree296eefce750c250f8352a0d291e4f09868104293 /src/alloc.c
parentdff45157417d1620c4fb7b6c117cc89142009b69 (diff)
downloademacs-7bc26fdb5c3b50b29bff966a55394e730fbfadd8.tar.gz
emacs-7bc26fdb5c3b50b29bff966a55394e730fbfadd8.zip
* alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not needed otherwise. (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. (GC_STRING_CHARS): Remove; not used.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c
index fd1334a6ef7..7fa2790cb1e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -92,7 +92,8 @@ extern __malloc_size_t __malloc_extra_blocks;
92 92
93#endif /* not DOUG_LEA_MALLOC */ 93#endif /* not DOUG_LEA_MALLOC */
94 94
95#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) 95#if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT
96#ifdef HAVE_GTK_AND_PTHREAD
96 97
97/* When GTK uses the file chooser dialog, different backends can be loaded 98/* When GTK uses the file chooser dialog, different backends can be loaded
98 dynamically. One such a backend is the Gnome VFS backend that gets loaded 99 dynamically. One such a backend is the Gnome VFS backend that gets loaded
@@ -130,12 +131,13 @@ static pthread_mutex_t alloc_mutex;
130 } \ 131 } \
131 while (0) 132 while (0)
132 133
133#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ 134#else /* ! defined HAVE_GTK_AND_PTHREAD */
134 135
135#define BLOCK_INPUT_ALLOC BLOCK_INPUT 136#define BLOCK_INPUT_ALLOC BLOCK_INPUT
136#define UNBLOCK_INPUT_ALLOC UNBLOCK_INPUT 137#define UNBLOCK_INPUT_ALLOC UNBLOCK_INPUT
137 138
138#endif /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ 139#endif /* ! defined HAVE_GTK_AND_PTHREAD */
140#endif /* ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT */
139 141
140/* Value of _bytes_used, when spare_memory was freed. */ 142/* Value of _bytes_used, when spare_memory was freed. */
141 143
@@ -152,13 +154,11 @@ static __malloc_size_t bytes_used_when_full;
152#define VECTOR_UNMARK(V) ((V)->size &= ~ARRAY_MARK_FLAG) 154#define VECTOR_UNMARK(V) ((V)->size &= ~ARRAY_MARK_FLAG)
153#define VECTOR_MARKED_P(V) (((V)->size & ARRAY_MARK_FLAG) != 0) 155#define VECTOR_MARKED_P(V) (((V)->size & ARRAY_MARK_FLAG) != 0)
154 156
155/* Value is the number of bytes/chars of S, a pointer to a struct 157/* Value is the number of bytes of S, a pointer to a struct Lisp_String.
156 Lisp_String. This must be used instead of STRING_BYTES (S) or 158 Be careful during GC, because S->size contains the mark bit for
157 S->size during GC, because S->size contains the mark bit for
158 strings. */ 159 strings. */
159 160
160#define GC_STRING_BYTES(S) (STRING_BYTES (S)) 161#define GC_STRING_BYTES(S) (STRING_BYTES (S))
161#define GC_STRING_CHARS(S) ((S)->size & ~ARRAY_MARK_FLAG)
162 162
163/* Global variables. */ 163/* Global variables. */
164struct emacs_globals globals; 164struct emacs_globals globals;
@@ -5306,7 +5306,6 @@ mark_object (Lisp_Object arg)
5306 5306
5307#else /* not GC_CHECK_MARKED_OBJECTS */ 5307#else /* not GC_CHECK_MARKED_OBJECTS */
5308 5308
5309#define CHECK_ALLOCATED() (void) 0
5310#define CHECK_LIVE(LIVEP) (void) 0 5309#define CHECK_LIVE(LIVEP) (void) 0
5311#define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 5310#define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0
5312 5311