Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Mic92/fast-nix-gc
/ functions
Functions
333 in github.com/Mic92/fast-nix-gc
⨍
Functions
333
◇
Types & classes
29
↓ 2 callers
Function
run_gc_with_early_root
Connect to the gc-socket during the early window (before the graph is loaded), register a root, and let the GC continue.
crates/gc/tests/integration.rs:1210
↓ 2 callers
Function
rusqlite_open
(p: &Path)
crates/optimise/src/optimise.rs:666
↓ 2 callers
Method
set_deriver
(&self, out: &Pkg, drv: &Pkg)
crates/gc/tests/integration.rs:115
↓ 2 callers
Method
set_registration_time
(&self, p: &Pkg, time: i64)
crates/gc/tests/integration.rs:124
↓ 2 callers
Function
store_listing
Store entries on disk, excluding internal `.links`/lock files.
scripts/compare-dry-run.py:156
↓ 2 callers
Function
try_lock_dir
Lock a `tmp-*` build dir before deleting. None means a builder still holds it. Caller keeps the fd through deletion to avoid a TOCTOU race.
crates/gc/src/gc.rs:73
↓ 2 callers
Function
unshare_mount_namespace
()
crates/common/src/lib.rs:21
↓ 2 callers
Method
write_root
(&mut self, store_path: &str)
crates/common/src/temp_roots.rs:102
↓ 1 callers
Function
accept_loop
( listener: UnixListener, store_prefix: String, live: Arc<LiveSet>, graph: Arc<StoreGraph>,
crates/gc/src/gc_socket.rs:275
↓ 1 callers
Function
acquire_gc_lock
Same lock Nix takes. Builders hold it shared while registering temp roots; we take it exclusive so the root set can't change under us.
crates/gc/src/gc.rs:95
↓ 1 callers
Function
apply_corruptions
Apply random corruptions.
difftest/src/main.rs:306
↓ 1 callers
Method
cancel
Unblock every waiting protect(): used on GC teardown, where an error path may leave pending nodes that will never finish.
crates/gc/src/gc_socket.rs:176
↓ 1 callers
Function
cli_main
()
crates/optimise/src/optimise.rs:499
↓ 1 callers
Function
compare_gc
Compare nix-store --gc and fast-nix-gc on the store under `<tmp>/nix`. Corruption-affected paths are excluded from the set comparisons and validated s
difftest/src/main.rs:618
↓ 1 callers
Function
dep_list
(nodes: &[Node], node: &Node)
difftest/src/main.rs:148
↓ 1 callers
Function
dir_mutex
Sharded mutex pool keyed by parent directory. Bounds memory while keeping contention low for typical fan-out.
crates/optimise/src/optimise.rs:157
↓ 1 callers
Function
edit_distance
(a: &str, b: &str)
crates/common/src/lib.rs:141
↓ 1 callers
Method
enabled
(&self, m: &log::Metadata)
crates/common/src/logging.rs:9
↓ 1 callers
Function
expr
(fod_rec_hash: str)
scripts/compare-dry-run.py:58
↓ 1 callers
Function
fake_hash
(i: usize)
proptest/proptest_gc.rs:16
↓ 1 callers
Function
filesystem_bytes
Free and total bytes on the filesystem containing `path`.
crates/gc/src/main.rs:74
↓ 1 callers
Function
find_binary
Locate the fast-nix-gc binary: $FAST_NIX_GC or next to our own exe.
difftest/src/main.rs:469
↓ 1 callers
Function
find_roots_in_dir
( dir: &Path, store_prefix: &str, idx: &BasenameIndex, roots: &mut HashSet<u32>, )
crates/gc/src/roots.rs:61
↓ 1 callers
Function
gen_graph
(rng: &mut StdRng, keep_outputs: bool)
difftest/src/main.rs:74
↓ 1 callers
Function
gen_graph
Random DAG: node i only references nodes < i, so closures are acyclic.
crates/gc/tests/socket_concurrency.rs:28
↓ 1 callers
Function
graph
(paths: &[&str])
crates/gc/src/roots.rs:751
↓ 1 callers
Function
handle_client
( stream: UnixStream, store_prefix: &str, live: &LiveSet, graph: &StoreGraph, idx: &HashMa
crates/gc/src/gc_socket.rs:334
↓ 1 callers
Function
is_store_path_basename
True if `name` matches the store-path basename grammar: `<nix32hash>-<name>` where the hash is 32 chars of `[0-9a-z]`.
crates/gc/src/roots.rs:202
↓ 1 callers
Function
is_store_path_char
True for chars allowed in a Nix store path basename. Mirrors Nix's storePathRegex: `[0-9a-z]+[0-9a-zA-Z+\-._?=]*`. We accept the union since we extrac
crates/gc/src/roots.rs:216
↓ 1 callers
Function
iteration
(binary: &Path, seed: u64)
difftest/src/main.rs:752
↓ 1 callers
Function
kern_argmax
()
crates/gc/src/roots.rs:634
↓ 1 callers
Function
libc_emlink
()
crates/optimise/src/optimise.rs:316
↓ 1 callers
Function
libc_enospc
()
crates/optimise/src/optimise.rs:313
↓ 1 callers
Function
list_pids
()
crates/gc/src/roots.rs:450
↓ 1 callers
Method
load_graph_in_txn
(&self)
crates/common/src/db.rs:108
↓ 1 callers
Function
main
()
scripts/check-alloy.py:13
↓ 1 callers
Function
main
()
scripts/mkstore.py:46
↓ 1 callers
Function
main
()
scripts/compare-dry-run.py:183
↓ 1 callers
Method
make_writable
(&self)
crates/optimise/benches/optimise_bench.rs:99
↓ 1 callers
Method
maybe_vacuum
VACUUM if enough of the file is free pages to be worth a full rewrite: at least a quarter of the file and at least 64 pages (256 KiB at the default pa
crates/common/src/db.rs:387
↓ 1 callers
Function
nix_config
(rng: &mut StdRng, keep_outputs: bool)
difftest/src/main.rs:230
↓ 1 callers
Function
normalize_dir
Strip trailing slashes (but keep a bare "/").
crates/common/src/db.rs:407
↓ 1 callers
Method
notify_gc
Send the root to the running GC; Ok(false) means the GC went away and the caller should restart with the lock.
crates/common/src/temp_roots.rs:110
↓ 1 callers
Function
one_run
(seed: u64)
crates/gc/tests/socket_concurrency.rs:114
↓ 1 callers
Function
optimise_file
( path: PathBuf, meta: fs::Metadata, links_dir: Arc<PathBuf>, store_dir: Arc<PathBuf>, opt
crates/optimise/src/optimise.rs:180
↓ 1 callers
Function
parse_args
()
crates/gc/src/main.rs:84
↓ 1 callers
Function
parse_args
()
crates/optimise/src/optimise.rs:547
↓ 1 callers
Function
parse_bool
(s: &[u8])
crates/common/src/nix_config.rs:39
↓ 1 callers
Function
parse_size
Parse a size like "50G", "512M", "1024K", or plain bytes.
crates/gc/src/main.rs:57
↓ 1 callers
Function
pid_cwd_root
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:486
↓ 1 callers
Function
pid_environ
(pid: i32, argmax: usize, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:610
↓ 1 callers
Function
pid_exe
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:472
↓ 1 callers
Function
pid_fds
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:512
↓ 1 callers
Function
pid_regions
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:569
↓ 1 callers
Method
protect
Mark the closure of `basename` as protected and wait until none of it is still being deleted.
crates/gc/src/gc_socket.rs:139
↓ 1 callers
Method
protect_unknown_basename
Mark a basename outside the graph as protected (used to carry over roots received before the graph was loaded).
crates/gc/src/gc_socket.rs:91
↓ 1 callers
Method
protected_snapshot
Snapshot of per-node protection flags (dry-run reporting).
crates/gc/src/gc_socket.rs:80
↓ 1 callers
Function
render_expr
(nodes: &[Node], src_dir: &Path)
difftest/src/main.rs:163
↓ 1 callers
Function
replace_with_link
Replace `path` with a hardlink to `link_path`. Store dirs are read-only with mtime 1; toggle writable around the rename and restore afterwards. Holds
crates/optimise/src/optimise.rs:87
↓ 1 callers
Function
resolve_indirect_root
Indirect root: symlink -> symlink -> store. Nix's findRoots resolves at most one extra hop. Resolve it with lstat + readlink, never a following stat()
crates/gc/src/roots.rs:122
↓ 1 callers
Function
run_client
Register random roots and mark each acked root's closure; the deleter must never unlink an acked node.
crates/gc/tests/socket_concurrency.rs:86
↓ 1 callers
Function
run_deleter
Mirror of the gc.rs deletion loop: claim a chunk, drop the closures of skipped (protected) paths, then unlink each claimed node.
crates/gc/tests/socket_concurrency.rs:52
↓ 1 callers
Function
scan
(store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:288
↓ 1 callers
Function
scopeguard
(dir: &Path, active: bool)
crates/optimise/src/optimise.rs:151
↓ 1 callers
Function
set_link_mtime
(path: &Path, t: SystemTime)
crates/gc/src/profiles.rs:368
↓ 1 callers
Function
set_mtime_to_one
(path: &Path)
crates/optimise/src/optimise.rs:167
↓ 1 callers
Method
target_bytes
(self, total: u64)
crates/gc/src/main.rs:31
↓ 1 callers
Method
try_begin_delete_unknown
Same as `try_begin_delete_node` for paths not in the graph.
crates/gc/src/gc_socket.rs:121
↓ 1 callers
Function
validate_fast_alone
When Nix cannot GC the corrupted store at all, check fast-nix-gc on its own: it must run, its real GC must match its dry-run prediction, and disk must
difftest/src/main.rs:574
Method
acquire
(profile: &Path)
crates/gc/src/profiles.rs:98
Function
add_uses_gc_socket_when_gc_holds_the_lock
()
crates/common/src/temp_roots.rs:182
Function
add_writes_nul_terminated_roots
()
crates/common/src/temp_roots.rs:164
Method
alive
Fixpoint reachability over the modeled liveness edges, mirroring the keep-derivations/keep-outputs rules from the GC's perspective.
fuzz/fuzz_targets/gc_graph.rs:165
Function
basename
(i: usize)
crates/gc/tests/socket_concurrency.rs:23
Function
basename_index_lookups
()
crates/common/src/db.rs:876
Function
basename_of
(i: usize)
fuzz/fuzz_targets/gc_graph.rs:79
Function
canonical_file_is_not_counted_as_linked
()
crates/optimise/src/optimise.rs:853
Function
claim_nodes_partitions_and_blocks_protect
()
crates/gc/src/gc_socket.rs:510
Function
clean_links_removes_only_unreferenced
()
crates/gc/src/gc.rs:675
Function
compute_closure_marks_reachable_only
()
crates/common/src/db.rs:892
Function
concurrent_clients_never_resurrect_deleted_paths
()
crates/gc/tests/socket_concurrency.rs:155
Function
corrupt_link_with_size_mismatch_is_skipped
()
crates/optimise/src/optimise.rs:829
Function
current_generation_none_when_missing
()
crates/gc/src/profiles.rs:499
Function
dedups_identical_files
()
crates/optimise/src/optimise.rs:611
Method
default
()
crates/optimise/src/optimise.rs:42
Function
delete_generations_older_than_cutoff
()
crates/gc/src/profiles.rs:396
Function
delete_old_generations_keeps_only_current
()
crates/gc/src/profiles.rs:384
Function
delete_store_path_file_reports_disk_blocks
()
crates/gc/src/gc.rs:637
Function
delete_store_path_missing_is_zero
()
crates/gc/src/gc.rs:622
Function
delete_store_path_other_stat_errors_propagate
()
crates/gc/src/gc.rs:628
Function
delete_store_path_removes_readonly_tree
()
crates/gc/src/gc.rs:648
Function
deleted_count
Parse "<N> store paths deleted" from fast-nix-gc stdout.
crates/gc/benches/gc_bench.rs:143
Method
drop
(&mut self)
difftest/src/main.rs:392
Method
drop
(&mut self)
crates/gc/src/profiles.rs:133
Method
drop
(&mut self)
crates/gc/src/gc_socket.rs:254
Method
drop
(&mut self)
crates/optimise/src/optimise.rs:144
Function
drop_joins_handlers_and_snapshot_sees_acked_roots
()
crates/gc/src/gc_socket.rs:542
Function
drop_returns_when_idle_accept_loop_is_waiting
()
crates/gc/src/gc_socket.rs:392
Function
dry_run_counts_but_does_not_link
()
crates/optimise/src/optimise.rs:789
Function
dry_run_takes_no_temp_roots
()
crates/optimise/src/optimise.rs:910
← previous
next →
101–200 of 333, ranked by callers