Repository navigation
Tags
Tags
Give memory back, and release 0.9.0 (#190) * Keep less memory per file a mount is asked about Box the rarely set removed_from of each inode, keep only directories in the core's path-to-entry cache (files are one listing lookup further), share that cache's keys with the entries' own, shrink the inode table once the kernel forgets most of it, and cap a git mount's recent whole file reads at 64 MiB. A 200k-file walk goes from 147 MB to 89 MB with the same walk times. With files out of the path-entry cache, a recheck of a shrunk file changes only its listing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Copy a folder on another disk onto that disk instead of refusing it Files clone only within one disk, so a fork of a plain folder on another disk used to fail with CrossDevice unless allow_copy made a full copy. Its frozen copy now goes in .sandfs/copies at the top of the folder's own disk, registered in the home's copies-elsewhere file, and is cleaned up with the home's other copies. The .sandfs folder is left out of forks of that disk's top. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Set a copied file's time on Windows through a handle that may write attributes A full copy (allow_copy) opened each copied file read-only to set its modification time, which Windows refuses, and opened folders without backup semantics, which Windows can't. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Never keep copies through a .sandfs link, and hide .sandfs only at a disk's top A .sandfs or .sandfs/copies at a disk's top that is a link could point into the folder being copied, which would then copy into itself; such a disk's copies stay in the home. A folder's own .sandfs/copies, away from a disk's top, is listed as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Keep copies on another disk only where no one else can move their folder Anyone who could write .sandfs or .sandfs/copies at a disk's top, or rename them there, could swap a home's folder for a link, and copies would be written, and deleted, wherever it led. Those folders must be the home owner's and writable by no one else, at a top that is not writable by others or is sticky; otherwise the copy stays in the home, and cleanup leaves such a folder alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Release 0.9.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Keep a mount's caches to a budget and give memory back Folder listings, directories found and file bytes a workspace keeps stay within a budget, least used first out. A mount unused for a minute, or asked with `sandfs trim` / `Home::trim`, saves its changes, drops those caches, ends idle git readers and asks the allocator to hand freed memory back to the system, as it now does after every unmount. Paths in a mount's table of files are held once instead of twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Count a process tree's peaks on a tree of idle processes The test summed this test process's own peak with its child's and compared that with the tree's, read a moment later. Linux updates a process's peak lazily, so once memory is freed (as other tests, and now a mount's hand-back, do) the later reading can be lower. A shell with two sleeping children frees nothing meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Say a trim's given-back bytes only when the allocator names some, and log idle trims On macOS 27 the allocator answered 0 while it handed the pages back over the next seconds, so "0 B given back" read as a failure. The walk test also times each walk now, against the cache budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK * Count a load that finishes after its cache half turned old, and note the unsafe exception A slow load whose slot moved to the old half had its bytes dropped, so once it moved back it counted as an empty slot and the cache could pass its budget. Its bytes now go on the old entry when it is the same slot. AGENTS.md names the one allowed unsafe function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jkdGETmgGUb8hcSEpppQK --------- Co-authored-by: Claude <noreply@anthropic.com>
PreviousNext