Skip to content

Commit 73967ba

Browse files
committed
Adapt GC to new APIs.
1 parent e01ce3a commit 73967ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,15 +3486,15 @@ void jl_gc_init(void)
34863486
// on a big memory machine, set max_collect_interval to totalmem / nthreads / 2
34873487
uint64_t total_mem = uv_get_total_memory();
34883488
uint64_t constrained_mem = uv_get_constrained_memory();
3489-
if (constrained_mem > 0 && constrained_mem < total_mem)
3489+
if (constrained_mem != 0)
34903490
total_mem = constrained_mem;
34913491
size_t maxmem = total_mem / jl_n_threads / 2;
34923492
if (maxmem > max_collect_interval)
34933493
max_collect_interval = maxmem;
34943494
#endif
34953495

34963496
// We allocate with abandon until we get close to the free memory on the machine.
3497-
uint64_t free_mem = uv_get_free_memory();
3497+
uint64_t free_mem = uv_get_available_memory();
34983498
uint64_t high_water_mark = free_mem / 10 * 7; // 70% high water mark
34993499

35003500
if (high_water_mark < max_total_memory)

0 commit comments

Comments
 (0)