Skip to content

Commit 1237d41

Browse files
gbaraldiKristofferC
authored andcommitted
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 (cherry picked from commit 500f561)
1 parent c31107c commit 1237d41

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/gc.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3682,15 +3682,9 @@ void jl_gc_init(void)
36823682
uint64_t constrained_mem = uv_get_constrained_memory();
36833683
if (constrained_mem > 0 && constrained_mem < total_mem)
36843684
total_mem = constrained_mem;
3685+
max_total_memory = total_mem / 10 * 6;
36853686
#endif
36863687

3687-
// We allocate with abandon until we get close to the free memory on the machine.
3688-
uint64_t free_mem = uv_get_available_memory();
3689-
uint64_t high_water_mark = free_mem / 10 * 7; // 70% high water mark
3690-
3691-
if (high_water_mark < max_total_memory)
3692-
max_total_memory = high_water_mark;
3693-
36943688
jl_gc_mark_sp_t sp = {NULL, NULL, NULL, NULL};
36953689
gc_mark_loop(NULL, sp);
36963690
t_start = jl_hrtime();

0 commit comments

Comments
 (0)