Skip to content

runtime: scavengeOne ignores searchIdx optimization #54892

Closed
@mvdan

Description

@mvdan
// [...]
// searchIdx is the page index to start searching from in ci.
// [...]
func (p *pageAlloc) scavengeOne(ci chunkIdx, searchIdx uint, max uintptr) uintptr {

Yet searchIdx has never been used in the func body, as far as I can see. Is the parameter truly unnecessary and can be removed, or is it a bug that the parameter isn't being used? I found this one via unparam, but it's not a clear one without understanding the context of the function.

cc @mknyszek @prattmic per git blame :)

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions