Skip to content

Commit

Permalink
Fix 32 bit again?
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi committed Feb 10, 2023
1 parent af18221 commit 4a15880
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3246,17 +3246,15 @@ void jl_gc_init(void)
gc_num.allocd = 0;
gc_num.max_pause = 0;
gc_num.max_memory = 0;
total_mem = uv_get_total_memory();

#ifdef _P64
total_mem = uv_get_total_memory();
uint64_t constrained_mem = uv_get_constrained_memory();
if (constrained_mem > 0 && constrained_mem < total_mem)
total_mem = constrained_mem;
#else
total_mem = total_mem > max_total_memory ? max_total_memory : total_mem;
max_total_memory = total_mem / 10 * 6;
#endif

total_mem = total_mem / 10 * 6; // 60% of constrained memory
t_start = jl_hrtime();
}

Expand Down

0 comments on commit 4a15880

Please sign in to comment.