runtime: probably unwanted integer division in scavenger pacing #44036
Labels
Comments
Erg, yeah good catch, thank you. I like to think that constants are truly untyped, but that's wrong. :) Luckily, it looks like we didn't hit this case much in practice or not any case that was important enough for someone to report a bug about it. This makes sense since the scavenger isn't quite as useful in the context of, say, a CLI tool, where it's more likely this case could happen (e.g. laptop lid closes during the section where we're measuring time). I'll send a fix, but it's probably not worth backporting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've stumbled across the following code, which IMO is incorrect:
go/src/runtime/mgcscavenge.go
Lines 371 to 378 in 6ac91e4
The value of minFraction is
0
, which makes the check pointless./cc @mknyszek to confirm my suspicion, as I'm not familiar with any of this code.
The text was updated successfully, but these errors were encountered: