summaryrefslogtreecommitdiff
path: root/thread_local_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_local_alloc.c')
-rw-r--r--thread_local_alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index 52c5863f..900bcaeb 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -98,7 +98,10 @@ GC_INNER void GC_init_thread_local(GC_tlfs p)
GC_ASSERT(I_HOLD_LOCK());
if (!EXPECT(keys_initialized, TRUE)) {
- GC_ASSERT((word)&GC_thread_key % sizeof(word) == 0);
+# ifdef USE_CUSTOM_SPECIFIC
+ /* Ensure proper alignment of a "pushed" GC symbol. */
+ GC_ASSERT((word)&GC_thread_key % sizeof(word) == 0);
+# endif
res = GC_key_create(&GC_thread_key, reset_thread_key);
if (COVERT_DATAFLOW(res) != 0) {
ABORT("Failed to create key for local allocator");