Skip to content

Commit

Permalink
Adapt GC to new APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Sep 19, 2022
1 parent e01ce3a commit 73967ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3486,15 +3486,15 @@ void jl_gc_init(void)
// on a big memory machine, set max_collect_interval to totalmem / nthreads / 2
uint64_t total_mem = uv_get_total_memory();
uint64_t constrained_mem = uv_get_constrained_memory();
if (constrained_mem > 0 && constrained_mem < total_mem)
if (constrained_mem != 0)
total_mem = constrained_mem;
size_t maxmem = total_mem / jl_n_threads / 2;
if (maxmem > max_collect_interval)
max_collect_interval = maxmem;
#endif

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

if (high_water_mark < max_total_memory)
Expand Down

0 comments on commit 73967ba

Please sign in to comment.