Richard Henderson <richard.hender...@linaro.org> writes:
> On 7/21/20 11:28 PM, Alex Bennée wrote: >> + size_t phys_mem = qemu_get_host_physmem(); >> + if (phys_mem > 0 && phys_mem < (2 * DEFAULT_CODE_GEN_BUFFER_SIZE)) { >> + tb_size = phys_mem / 8; >> + } else { >> + tb_size = DEFAULT_CODE_GEN_BUFFER_SIZE; >> + } > > I don't understand the 2 * DEFAULT part. I figured once you had at least twice as much memory you could use the full amount but... > Does this make more sense as > > if (phys_mem == 0) { > tb_size = default; > } else { > tb_size = MIN(default, phys_mem / 8); > } This is probably a less aggressive tapering off which still doesn't affect my 32gb dev machine ;-) -- Alex Bennée