feat: dynamically compute seed expansion based on RSS

Introduce a `peak_rss_bytes()` utility for accurate per-phase RAM measurement. Replace the genome-length heuristic with a dynamic seed expansion ratio based on actual RSS delta. Explicitly drop the `GraphDeBruijn` instance before MPHF construction to prevent resource contention and ensure proper memory management.
This commit is contained in:
Eric Coissac
2026-06-12 16:28:03 +02:00
parent db9c604199
commit 2bc189e962
4 changed files with 19 additions and 6 deletions
+4 -2
View File
@@ -223,12 +223,14 @@ impl KmerPartition {
uw.write(&unitig)
})?;
uw.close()?;
let n = g.len();
drop(g); // release GraphDeBruijn before MPHF build
Layer::<()>::build(&new_layer_dir, block_bits, evidence).map_err(olm_to_sk)?;
g.len()
n
} else {
drop(g);
0
};
drop(g);
let new_mphf = if any_new {
Some(MphfOnly::open(&new_layer_dir).map_err(olm_to_sk)?)