Skip to content

Commit fdada6c

Browse files
committed
Fix some build issues
1 parent b472648 commit fdada6c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/mmtk-gc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ void jl_gc_init(void)
350350
max_heap_size = uv_get_free_memory() * 70 / 100;
351351
}
352352

353-
// If the two values are the same, we can use either. Otherwise, we need to be careful.
354-
assert(jl_n_gcthreads == jl_options.ngcthreads);
355353

356354
// Check that the julia_copy_stack rust feature has been defined when the COPY_STACK has been defined
357355
int copy_stacks;
@@ -366,11 +364,12 @@ void jl_gc_init(void)
366364

367365
// if only max size is specified initialize MMTk with a fixed size heap
368366
// TODO: We just assume mark threads means GC threads, and ignore the number of concurrent sweep threads.
367+
// If the two values are the same, we can use either. Otherwise, we need to be careful.
369368
uintptr_t gcthreads = jl_options.nmarkthreads;
370369
if (max_size_def != NULL || (max_size_gb != NULL && (min_size_def == NULL && min_size_gb == NULL))) {
371-
mmtk_gc_init(0, max_heap_size, jl_options.ngcthreads, &mmtk_upcalls, (sizeof(jl_taggedvalue_t)), jl_buff_tag);
370+
mmtk_gc_init(0, max_heap_size, gcthreads, &mmtk_upcalls, (sizeof(jl_taggedvalue_t)), jl_buff_tag);
372371
} else {
373-
mmtk_gc_init(min_heap_size, max_heap_size, jl_options.ngcthreads, &mmtk_upcalls, (sizeof(jl_taggedvalue_t)), jl_buff_tag);
372+
mmtk_gc_init(min_heap_size, max_heap_size, gcthreads, &mmtk_upcalls, (sizeof(jl_taggedvalue_t)), jl_buff_tag);
374373
}
375374
}
376375

src/partr.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,20 @@ void jl_gc_sweep_threadfun(void *arg)
168168
}
169169
}
170170

171+
#else
172+
173+
// gc thread mark function
174+
void jl_gc_mark_threadfun(void *arg)
175+
{
176+
mmtk_unreachable();
177+
}
178+
179+
// gc thread sweep function
180+
void jl_gc_sweep_threadfun(void *arg)
181+
{
182+
mmtk_unreachable();
183+
}
184+
171185
#endif
172186

173187
// thread function: used by all mutator threads except the main thread

0 commit comments

Comments
 (0)