migrate gc.rs to LinearSet