QUERY · ISSUE
gc threshold calculation in docs/reference/constrained
docs
This has
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4)
which sets the threshold to 1/4 of the total RAM regardless of the amount allocated. Shouldn't this read
gc.threshold(gc.mem_free() // 4 + gc.mem_alloc())
to account for RAM already allocated?
CANDIDATE · PULL REQUEST
tests/basics/gc1: Garbage collector threshold() coverage.
gc.threshold() coverage. Only return values are checked for micropython's implementation.