Skip to content

Commit 500f561

Browse files
authored
Allow for use 60% of constrained/total system memory (#48614)
Remove the high watermark logic, because it doesn't really make sense, and allow for use of 60% of system memory before aggressive GC kicks in. Should fix #48473
1 parent 1ef78a2 commit 500f561

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/gc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,14 +3252,9 @@ void jl_gc_init(void)
32523252
uint64_t constrained_mem = uv_get_constrained_memory();
32533253
if (constrained_mem > 0 && constrained_mem < total_mem)
32543254
total_mem = constrained_mem;
3255+
max_total_memory = total_mem / 10 * 6;
32553256
#endif
32563257

3257-
// We allocate with abandon until we get close to the free memory on the machine.
3258-
uint64_t free_mem = uv_get_available_memory();
3259-
uint64_t high_water_mark = free_mem / 10 * 7; // 70% high water mark
3260-
3261-
if (high_water_mark < max_total_memory)
3262-
max_total_memory = high_water_mark;
32633258
t_start = jl_hrtime();
32643259
}
32653260

0 commit comments

Comments
 (0)