確か、Firefox Ultimate Optimizerというソフトが同じようなことを行っていたと思います。
自分で組んでみたものです。メモリ使用量に変化がありません。
//三秒後に最前面のウィンドウのプロセスのワーキングセットを縮小 #uselib "kernel32.dll" #func SetProcessWorkingSetSize "SetProcessWorkingSetSize" int, int, int #func GetProcessWorkingSetSize "GetProcessWorkingSetSize" int, int, int #cfunc OpenProcess "OpenProcess" sptr, sptr, sptr #func CloseHandle "CloseHandle" sptr #uselib "user32.dll" #func GetForegroundWindow "GetForegroundWindow" #func GetWindowThreadProcessId "GetWindowThreadProcessId" int, int onexit *exit wait 300 goto *start stop *start GetForegroundWindow whTarget = stat mes strf("TargetHandle = %d", whTarget) mes "-----------------------------" GetWindowThreadProcessId whTarget, varptr(pId) mes strf("%d = GetWindowThreadProcessId", stat) mes strf("ProcessID = %d", pId) mes "----------------------------" phTarget = OpenProcess(0x400 | 0x010 | 0x001, 0, pId) mes strf("%d = OpenProcess", phTarget) mes "-----------------------------" GetProcessWorkingSetSize phTarget, varptr(iMinSize), varptr(iMaxSize) mes strf("%d = GetProcessWorkingSetSize", stat) mes strf("NormalMinSize = %d, NormalMaxSize = %d", iMinSize, iMaxSize) mes "-----------------------------" SetProcessWorkingSetSize phTarget, 1, 1 mes strf("%d = SetProcessWorkingSetSize", stat) stop *exit SetProcessWorkingSetSize phTarget, iMinSize, iMaxSize CloseHandle phTarget end