Important
🚀 Looking for the Ultimate Windows 11 Desktop GUI Application [EXE] with 40% - 60% Memory Reclamation And More?
Upgrade to RAM Cleaner & Flusher Pro Suite — an enterprise-grade native Win32 C++ desktop application featuring Windows 11 Fluent 2.0 Dark & Light themes, Svchost Windows Service name resolution, App Launch Game & Software Booster, Process Inspector & Group Diagnostics, Automated Background Threshold Rules, System Tray Mode, Silent Auto-Updater, and 100% Full Compatibility across Windows 7, 8, 10, 11 (21H2-26H1) & Windows Server!
A professional, enterprise-grade, high-performance, and lightweight memory optimization utility for Windows. Unlike generic memory cleaners that consume system resources or rely on slow and cached WMI metrics, this tool directly P/Invokes native Windows Win32 APIs (GlobalMemoryStatusEx, NtSetSystemInformation, and EmptyWorkingSet) to safely, accurately, and instantaneously reclaim standby, modified, and working set memory.
Developed by AliSakkaf. Connect with me on GitHub and Facebook.
- 🎮 Expanded 9-Option Interactive Menu: New interactive console dashboard featuring direct choices for App Launch Booster (Option 6), Exclusion Protection Manager (Option 7), Auto Memory Threshold Check (Option 8), and Exit (Option 9).
- 🚀 App Launch Game & Software Booster: Pre-purges system RAM and launches any target application with
HIGH_PRIORITY_CLASSpriority to eliminate micro-stutters in open-world games and heavy IDEs. - 🛡️ Exclusion Protection Manager: Interactive and CLI protection engine allowing users to add process names (
chrome,devenv,vlc.exe) to prevent working set trimming routines from touching active programs. - ⚡ Auto RAM Threshold Check: Configure trigger thresholds (e.g. 80%). The script checks real-time RAM load and automatically executes Maximum Optimization if memory load exceeds the threshold limit.
- 🔒 UTF-8 BOM Parser Security: Encoded strictly in UTF-8 with BOM (
utf-8-sig) to guarantee Windows PowerShell 5.1 parses ASCII banner blocks, ampersands (&), and multi-stop strings without ANSI codepage corruption across all global Windows locales. - 🤖 Non-Interactive Headless CLI Modes: Full support for background task scheduling via
-Mode,-Silent,-AutoThreshold,-ExcludeProcess, and-BoostAppparameters.
The utility starts with a premium console interface displaying a custom ASCII art banner, real-time physical memory status, active protected exclusions, and a color-coded memory utilization bar.

Visual snapshot of the system under high memory load (heavy consumption of used memory and standby cache).

Visual snapshot of the dashboard showing memory load reduction, increased free memory, and cleared standby cache.

Every optimization run outputs a detailed comparative table showing the exact changes in Used RAM, Free RAM, and RAM Load (%), alongside the total physical memory released in both Gigabytes (GB) and Megabytes (MB).

- Direct Win32 P/Invoke Declarations: Bypasses the overhead of standard PowerShell cmdlets by loading and compiling native DLL entry points (
ntdll.dll,kernel32.dll,psapi.dll, andadvapi32.dll) directly into the session. - Instantaneous Memory Metrics: Utilizes the native C++
GlobalMemoryStatusExAPI to obtain an un-cached snapshot of physical memory, bypassing WMI lag to show immediate and accurate results. - Process Working Set Trimming: Loops through active process handles and calls
EmptyWorkingSet(or fallback toSetProcessWorkingSetSizewith-1, -1) to release unused process pages back to the operating system. - Standby List Purge: Reclaims standby cache memory system-wide by calling
NtSetSystemInformationwith Class80(SystemMemoryListInformation) and command4(MemoryPurgeStandbyList). - Modified Page List Flush: Commits modified pages to pagefiles or disk storage by calling
NtSetSystemInformationwith command3(MemoryFlushModifiedList), turning dirty pages into standby/free memory. - System Working Set Flush: Trims kernel-level working sets by calling
NtSetSystemInformationwith command2(MemoryEmptyWorkingSets). - Maximum Optimization Mode: Executes all flushing and trimming operations sequentially, accompanied by a 1.5-second stabilization delay (
Start-SyncDelay) to let the Windows memory manager synchronize. - UTF-8 BOM Parser Encoding: Encoded strictly in UTF-8 with BOM to prevent Windows-1252 ANSI encoding parsing errors, protecting Unicode block characters and avoiding ampersand/quote crashes on non-English locales.
- Self-Elevating Execution: Detects administrative privileges upon execution and prompts to restart automatically with Administrator permissions to enable diagnostic memory rights.
OPTIMIZATION & FEATURE OPTIONS:
[1] Maximum Optimization (Run All Actions Sequentially)
[2] Quick Optimization (Trim Process Working Sets)
[3] Standby Cache Purge (Release Standby Memory)
[4] Modified Memory Flush (Flush Modified Pages to Disk)
[5] System-Wide Memory Flush (Trim Kernel & Drivers)
[6] App Launch Booster (Pre-Purge RAM & Launch App with HIGH Priority)
[7] Exclusion Protection Manager (Manage Protected Applications)
[8] Auto Memory Threshold Check (Run Optimization if RAM > Threshold %)
[9] Exit Program
Version 1.1 includes full CLI support for Task Scheduler, game launchers, and automated scripts:
powershell -ExecutionPolicy Bypass -File .\RAM_Flusher.ps1 -Mode Max -Silentpowershell -ExecutionPolicy Bypass -File .\RAM_Flusher.ps1 -Mode Max -AutoThreshold 80 -Silentpowershell -ExecutionPolicy Bypass -File .\RAM_Flusher.ps1 -Mode Max -ExcludeProcess "chrome","devenv","idea64"powershell -ExecutionPolicy Bypass -File .\RAM_Flusher.ps1 -BoostApp "C:\Games\Cyberpunk2077\bin\x64\Cyberpunk2077.exe"To understand how this tool operates, it is important to know the different memory lists managed by the Windows Kernel:
The working set of a process is the set of memory pages in the physical RAM currently page-mapped to that process's virtual address space. Over time, processes allocate memory that they no longer actively use. Trimming the working set forces Windows to reclaim these inactive pages and move them to the Standby list.
The Standby list is a cache of physical memory pages containing data/code that has been removed from process working sets but remains in RAM. If a process requests this data again, Windows resolves a "soft page fault" and maps it back instantly. However, if physical memory runs low, Windows moves these pages to the Free list. Purging this list releases these pages immediately.
The Modified list contains memory pages that have been modified by processes but have not yet been written to disk (pagefile). These pages cannot be reused for other purposes until they are committed. Flushing this list forces the modified writer thread to write them to disk, converting them to Standby or Free pages.
The script compiles a low-level C# class inside the PowerShell engine:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct MEMORYSTATUSEX {
public uint dwLength;
public uint dwMemoryLoad;
public ulong ullTotalPhys;
public ulong ullAvailPhys;
public ulong ullTotalPageFile;
public ulong ullAvailPageFile;
public ulong ullTotalVirtual;
public ulong ullAvailVirtual;
public ulong ullAvailExtendedVirtual;
}
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer);[DllImport("ntdll.dll", SetLastError = true)]
public static extern uint NtSetSystemInformation(
int SystemInformationClass,
IntPtr SystemInformation,
int SystemInformationLength
);| Operating System | Edition | Architecture | PowerShell | Status |
|---|---|---|---|---|
| Windows 11 | Home, Pro, Enterprise | x64, ARM64 | v5.1, v7.x | Fully Supported |
| Windows 10 | Home, Pro, Enterprise | x86, x64 | v5.1, v7.x | Fully Supported |
| Windows 8 / 8.1 | Pro, Enterprise | x86, x64 | v3.0, v4.0 | Fully Supported |
| Windows 7 SP1 | Home, Pro, Ultimate | x86, x64 | v2.0, v3.0 | Fully Supported |
| Windows Server | 2008 R2, 2012, 2016, 2019, 2022, 2025 | x64 | v2.0 - v5.1 | Fully Supported |
This tool interacts directly with native kernel routines. Therefore, it requires Administrative privileges to modify local security token privileges:
SeProfileSingleProcessPrivilege: Required to callNtSetSystemInformationfor purging standby lists.SeIncreaseQuotaPrivilege: Required to callSetProcessWorkingSetSizefor processes owned by other users or services.
Important
The source code contains no internet connections, trackers, or hidden telemetries. It is 100% auditable and safe to use in restricted corporate environments.
- Navigate to the extracted folder.
- Double-click
Ultra_RAM_Cleaner.bat. - Accept the UAC administrator prompt. The launcher automatically bypasses execution restrictions and loads the script.
- Open PowerShell as Administrator.
- Run the following commands:
Set-ExecutionPolicy Bypass -Scope Process -Force cd "C:\Path\To\RAM_Cleaner_Flusher" .\RAM_Flusher.ps1
Licensed under the MIT License. See the LICENSE file for copyright disclosures.
For bug reports, feature requests, or translations, feel free to open a ticket on the GitHub Repository issues page.
Created and maintained with ❤️ by AliSakkaf.