Skip to content
ZerroDevsPublic

About

Native Windows utility for virtual memory, page file sizing, memory tweaks, and NVMe/SSD wear monitoring.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

CryoFile

Windows 10 / 11 .NET 10.0 WPF MIT

A native Windows virtual memory, page file sizing, and SSD wear utility by ZeroNuxi under ZerroDevs.

CryoFile keeps Windows Page File sizing, Commit Charge pressure, physical disk wear, and memory management flags in one compact, elevated WPF utility. Move pagefile.sys off a wearing primary NVMe M.2 drive onto a secondary NTFS volume, set a fixed or dynamic page file size using a numbered slider with a clickable Windows Default marker, inspect each physical disk's remaining health and host gigabytes written, and prevent D3D12 out-of-commit crashes (0x8007000E) without editing the Registry by hand. Everything runs locally with zero accounts, zero kernel drivers, and zero telemetry.

The current baseline is 1.2.0. The application requires administrator elevation via app.manifest and uses SoftwareOnly WPF rendering plus off-UI working-set trimming (MemoryTrimService) to keep idle RAM and GPU VRAM footprint minimal while gaming.

Contents

At a glance

Item Details
Platform Windows 10 and Windows 11, x64
Runtime .NET 10 LTS with pure WPF (no WinForms, no third-party UI frameworks)
Privileges Administrator (requireAdministrator in app.manifest) for HKLM Registry writes, PS_MMAgent, and \\.\PhysicalDriveN IOCTLs
Telemetry source Win32 GlobalMemoryStatusEx, NtQuerySystemInformation(80), Win32_PageFileUsage, MSFT_PhysicalDisk, and NVMe IOCTL_STORAGE_QUERY_PROPERTY
Page File modes Enabled (Auto) (?\pagefile.sys), Enabled (Custom) (fixed or Min/Max growth), and Disabled
Memory tweaks ClearPageFileAtShutdown, DisablePagingExecutive, and live Windows Memory Compression (PS_MMAgent)
Appearance Light and Dark flat themes synced with the native DWM title bar
Storage %APPDATA%\CryoFile\settings.json, plus ACL-protected %ProgramData%\CryoFile\Update and Rollback
Network use GitHub Releases update checks and verified update package downloads only
Installers Inno Setup 6 Full Offline and Lite (auto-downloads .NET 10 Desktop Runtime) + portable archives
License MIT License

Feature tour

Live Memory & Page File Monitor

The left column monitors system memory pressure every 2 seconds (backing off to 10 seconds when minimized):

  • RAM Used & Commit Charge: Displays live Used / Total GB and percentage with flat semantic progress bars (green under 80%, amber at 80%+, red at 92%+) so you can spot commit pressure before hitting 0x8007000E.
  • Session Page File Usage: Queries Win32_PageFileUsage in the background every 10 seconds to show current MB used, session peak MB, and total allocated size.
  • NT Memory Lists: Calls NtQuerySystemInformation(SystemMemoryListInformation) to show Modified (dirty pages pending write) and Standby RAM in MB/GB.
  • CryoFile Working Set & Trim RAM: Shows CryoFile's own current working set and provides an inline Trim RAM button alongside automatic idle/deactivation trimming.

Disks Health & Total Written

Below the live monitor, Disks Health & Total Written maps every local physical disk to its mounted drive letters (Disk 0 (C:), Disk 1 (E:)) using MSFT_PhysicalDisk and IOCTL_STORAGE_GET_DEVICE_NUMBER:

  • NVMe SMART Health Log (0x02): Reads Percentage Used (displayed as remaining health %), Composite Temperature (°C), Power On Hours, and Data Units Written in GB / TB directly via IOCTL_STORAGE_QUERY_PROPERTY.
  • SATA / Storage Fallbacks: Falls back to MSFT_StorageReliabilityCounter and MSStorageDriver_FailurePredictData when a drive uses SATA/AHCI instead of NVMe.

Custom Size, Target Drive & Presets

The right column lets you size and relocate pagefile.sys safely:

  • Target Drive Picker: Dropdown of eligible fixed NTFS volumes (>= 20 GB, excluding small EFI/FAT32 partitions), showing each drive's free GB and disk health % so you can move pagefile.sys off your primary OS M.2 SSD.
  • Quick Presets: One-click pills for 8 GB (Low Wear), 24 GB (Gaming), and 32 GB (Heavy).
  • Fixed or Growth Slider: Sets fixed Initial == Maximum size by default (4 GB to 64 GB in 2 GB steps, capped safely to leave at least 10 GB free on the target drive). Enable Allow growth to reveal a second slider for independent Initial and Maximum limits.
  • Windows Default Scale Marker: Aligns numbered GB ticks directly under the slider track with a highlighted, clickable Default marker showing the Windows baseline and how far your selection sits from it.
  • One-Click Toggles: Disable Page File and Reset to Windows Auto (?\pagefile.sys) disable whichever action matches the active configuration.

Memory Management Tweaks

  • Clear Page File at Shutdown (ClearPageFileAtShutdown): Keep disabled to prevent Windows from overwriting the entire page file on every shutdown.
  • Keep Kernel & Drivers in RAM (DisablePagingExecutive): Prevents kernel-mode drivers and system code from paging to disk (recommended on 32 GB+ systems).
  • Windows Memory Compression: Reads and toggles compression live without a reboot via Root\Microsoft\Windows\PS_MMAgent:PS_MMAgent.

Restart Handling & Appearance

  • Because Windows locks pagefile.sys until reboot, changing page file or boot-time Registry settings displays an amber Restart Required to Apply Changes banner with confirmation-gated Restart Now (shutdown.exe /r /t 0) and Restart Later.
  • The top-right theme button switches live between flat Light and Dark palettes and persists your choice.

Install and run

Recommended: Inno Setup Installer

Download from GitHub Releases:

  • CryoFile-Setup-<version>.exe (Full Offline): Self-contained win-x64 installer with .NET 10 included; requires no runtime prerequisites.
  • CryoFile-Lite-Setup-<version>.exe (Lite): Compact framework-dependent installer (~2 MB) that detects .NET 10 Desktop Runtime (x64) and downloads it automatically if missing.

Both installers write to %ProgramFiles%\CryoFile, apply administrator-only write ACLs (admins-full system-full users-readexec), enable NTFS folder compression (compact.exe), and clean stale DLLs when switching from Full to Lite.

Portable Zip

Extract CryoFile-<version>-win-x64.zip (Full) or CryoFile-Lite-<version>-win-x64.zip (Lite) into an administrator-protected folder and launch CryoFile.exe (approve the UAC prompt).

Build from source

Prerequisites

Build

dotnet restore CryoFile.csproj
dotnet build CryoFile.csproj -c Release

The compiled executable is written to:

bin\Release\net10.0-windows\CryoFile.exe

Build Full & Lite installers locally

.\build-installer.ps1 -Variant All

You can also target -Variant Full or -Variant Lite. Outputs and .sha256 checksum files are written to:

Installer\Output\CryoFile-Setup-<version>.exe
Installer\Output\CryoFile-Lite-Setup-<version>.exe
release\CryoFile-<version>-win-x64.zip
release\CryoFile-Lite-<version>-win-x64.zip

Versioning and releases

The root VERSION file contains three numeric parts (Major.Minor.Patch). CryoFile.csproj reads it into assembly, file, and product versions. Pushing a change to VERSION on main, or dispatching .github/workflows/release.yml manually (stable or preview), builds and tests the app, compiles both Full and Lite Inno Setup installers, generates CryoFile-Update-<version>-win-x64.zip and delta patch archives (CryoFile-Patch-* / CryoFile-Lite-Patch-*) with per-file SHA-256 manifests, and publishes the GitHub Release.

Signing is automatic when WINDOWS_SIGNING_PFX_BASE64 and WINDOWS_SIGNING_PFX_PASSWORD repository secrets are configured; otherwise assets are published unsigned with .sha256 checksums.

Testing and diagnostics

CryoFile includes built-in verification harnesses executed directly from the compiled binary:

dotnet .\bin\Release\net10.0-windows\CryoFile.dll /test
dotnet .\bin\Release\net10.0-windows\CryoFile.dll /test-updates
  • /test (or /test-unit for non-elevated unit-only checks) verifies PagingFiles mode and custom-size parsing, the 10 GB disk headroom guard, collision-free slider scale ticks, MemoryTrimService coalescing and idle thresholds, SettingsService roundtrips, MainViewModel presets/growth clamping, Light/Dark STA MainWindow layout, and live disk/memory telemetry.
  • /test-updates verifies semantic version comparisons, .sha256 parsing, Full/Lite installer and delta-patch asset selection, manifest path-traversal and reserved-device-name rejection, completion markers, and (when elevated) ACL-hardened %ProgramData%\CryoFile storage and SHA-256 rollback backup verification.

These tests do not write to HKLM\...\PagingFiles or call shutdown.exe.

Data, privacy, and updates

CryoFile does not collect analytics, usage telemetry, or account data. All hardware and memory checks stay on the machine.

Local files:

  • %APPDATA%\CryoFile\settings.json: Theme, update channel (Stable/Preview), automatic check toggle, and last check outcome.
  • %ProgramData%\CryoFile\Update\: ACL-hardened download staging, update.log (rotated at 1 MiB), and last-update.json completion marker.
  • %ProgramData%\CryoFile\Rollback\: SHA-256-manifested rollback backup of the prior version (for archive/patch updates).

Update checks contact the GitHub Releases API:

https://github.com/api.github.com/repos/ZerroDevs/CryoFile/releases/latest

Only standard HTTPS requests with ETag caching and rate-limit respect are sent. Downloaded packages are verified against the release .sha256 asset (CryptographicOperations.FixedTimeEquals), checked with WinVerifyTrust, validated against update-manifest.json (with reparse-point and user-writable-directory rejection), and backed up before apply-update.ps1 replaces files. If any write fails, apply-update.ps1 automatically restores the verified rollback copy before relaunching CryoFile.

Architecture

CryoFile is a single-instance WPF process designed for minimal idle RAM and zero GPU VRAM overhead.

CryoFile.exe
├── App.xaml.cs                     SoftwareOnly rendering, mutex activation, startup trim, /test CLI
├── Models/
│   ├── PageFileStatus.cs           PageFileMode & MemoryTelemetry (RAM, Commit, NT memory lists)
│   ├── DriveOption.cs              Eligible fixed NTFS drives + disk health metadata
│   ├── DiskHealthInfo.cs           Physical disk wear %, temp, POH & GB/TB written
│   ├── MemoryTweaksState.cs        Registry & PS_MMAgent memory flag snapshot
│   └── AppSettings.cs              Persisted theme, channel & update check history
├── Services/
│   ├── NativeMethods.cs            System32-hardened Win32 P/Invoke declarations
│   ├── PageFileService.cs          HKLM Registry, GlobalMemoryStatusEx, NtQuerySystemInformation, volume IOCTL
│   ├── DiskHealthService.cs        MSFT_PhysicalDisk + NVMe SMART IOCTL + SATA SMART fallbacks
│   ├── MemoryTweaksService.cs      ClearPageFileAtShutdown, DisablePagingExecutive, PS_MMAgent
│   ├── MemoryTrimService.cs        Coalesced compacting GC + EmptyWorkingSet + 3m idle monitor
│   ├── UpdateService.cs            GitHub Releases API, downloader, manifest verifier & apply-update.ps1
│   ├── UpdateStorage.cs            ACL-hardened %ProgramData%\CryoFile & reparse-point guard
│   ├── UpdateBackupService.cs      SHA-256 verified rollback snapshot & integrity check
│   ├── RollbackReadinessService.cs Read-only rollback readiness check
│   ├── UpdateCompletionService.cs  Post-update completion marker across restarts
│   ├── UpdateInstallationService.cs Inno Setup GUID vs portable install classification
│   ├── AuthenticodeVerifier.cs     WinVerifyTrust signature check
│   ├── SettingsService.cs          Atomic %APPDATA%\CryoFile\settings.json persistence
│   ├── PowerService.cs             Confirmed shutdown /r /t 0 execution
│   └── ThemeService.cs             Light/Dark dynamic resource swapping & DWM title bar
├── ViewModels/
│   ├── MainViewModel.cs            Live polling, drive bounds, presets, growth sliders, tweaks & updates
│   └── RelayCommand.cs             ICommand / RelayCommand<T>
└── Views/
    ├── MainWindow.xaml             Flat two-column UI
    └── MainWindow.xaml.cs          ScaleCanvas tick layout, trim triggers & dialogs

Key implementation choices:

  • Zero GPU VRAM allocation. RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly keeps WPF off Direct3D surfaces so CryoFile never competes with games for VRAM.
  • DATAS GC & idle working-set trimming. GarbageCollectionAdaptationMode=1 and RetainVMGarbageCollection=false return unused memory segments to Windows, paired with coalesced off-UI GC.Collect + EmptyWorkingSet trimming on startup, deactivation, minimization, and idle checks.
  • Minimized polling backoff. Memory polling runs every 2 seconds while active and backs off to 10 seconds when minimized, skipping UI updates while minimized.
  • Single-instance safety. A named Mutex and EventWaitHandle focus the running elevated window instead of spawning duplicates.

Project layout

CryoFile.csproj                 .NET 10 WPF project, DATAS GC flags, version & icon metadata
VERSION                         Release version consumed by MSBuild, installers, and CI
LICENSE                         MIT License
SECURITY.md                     Security model, update hardening & vulnerability reporting
CONTRIBUTING.md                 Development prerequisites, coding standards & PR checklist
app.manifest                    requireAdministrator and PerMonitorV2 DPI awareness
build-installer.ps1             Full Offline & Lite publisher, Inno Setup compiler & zip packager
Installer/CryoFile.iss          Inno Setup 6 Full and Lite installer script
.github/workflows/release.yml   Automated test, build, installer, delta patch & release workflow
Models/                         Status, drive, disk health, tweak & settings records
Services/                       Virtual memory, NVMe/SMART disk health, RAM trim & updater services
ViewModels/                     MVVM state, presets, slider scale builder & commands
Views/                          MainWindow XAML and ScaleCanvas code-behind
Themes/                         LightTheme.xaml and DarkTheme.xaml flat brush dictionaries
Images/                         CryoFile.ico and CryoFile-Icon.png
Tests/                          Built-in /test and /test-updates verification suites

Limitations

  • Windows only. Depends on WPF, Windows Registry (HKLM), WMI (Win32_PageFileUsage, MSFT_PhysicalDisk, PS_MMAgent), and Win32 IOCTLs.
  • Administrator access is required. Modifying PagingFiles and querying \\.\PhysicalDriveN SMART logs require elevation.
  • Reboot required for Page File changes. Windows locks active pagefile.sys files until the next restart (MemoryCompression applies live without reboot).
  • SMART/TBW coverage depends on storage controller. Direct NVMe and standard SATA controllers report exact GB written and health %; some RAID arrays or USB-to-SATA bridges hide SMART counters and display N/A.
  • Self-update requires an admin-protected directory. Running a Release build from a user-writable folder (such as Desktop or Downloads) disables in-place self-updates for privilege safety; install via CryoFile-Setup or CryoFile-Lite-Setup to %ProgramFiles%\CryoFile for automatic updates.

Troubleshooting

Problem What to check
Game still crashes with 0x8007000E Confirm Commit Charge is below Commit Limit, reboot after clicking Apply Custom Size or Reset to Windows Auto, and lower in-game Texture Quality if VRAM is spilling into RAM
Disk shows N/A for Written GB or Health % Some RAID/USB enclosures block IOCTL_STORAGE_QUERY_PROPERTY and ATA SMART passthrough; internal NVMe/SATA ports report full telemetry
Secondary drive is missing from Target Drive dropdown Only ready, fixed NTFS volumes with at least 20 GB total size are listed
Apply Custom Size fails with disk space error CryoFile enforces at least 10 GB of free headroom on the chosen drive; lower the slider or free disk space
Self-update says folder is unsafe Move the portable folder to an administrator-only location or install using CryoFile-Setup / CryoFile-Lite-Setup into %ProgramFiles%\CryoFile
Update check fails Verify internet access to api.github.com and check whether a release has been published under the selected channel (Stable or Preview)

Security policy

CryoFile validates every downloaded update with HTTPS, .sha256 digests, WinVerifyTrust, ACL-protected staging, and reparse-point guards. See SECURITY.md for the full security model and private vulnerability reporting instructions.

Contributing

Bug reports, hardware SMART compatibility findings, and focused pull requests are welcome. Read CONTRIBUTING.md for build commands, architectural guidelines, theme rules, and the PR checklist before submitting changes.

License and attribution

CryoFile is licensed under the MIT License.

Copyright (c) 2026 ZeroNuxi - ZerroDevs.

About

Native Windows utility for virtual memory, page file sizing, memory tweaks, and NVMe/SSD wear monitoring.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages