18
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows 10 メモリ解放

Last updated at Posted at 2019-11-20

Windows 10 メモリ解放 by Microsoft 純正ツール

最近、Docker for Windows で遊んでいるのだが、起動しようとするとメモリ不足で失敗することがある。
メモリ 8GB じゃ足りないかな・・・と思いつつ、色々試した結果、Microsoft 純正のメモリ解放ツールが秀逸だった。

Resource Kit Tools の取得

以下のページより、Windows Server 2003 Resource Kit Tools をダウンロード
https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17657

実行ファイルをパスの通ったフォルダに格納

余分なものをインストールしたくなかったので、以下では 7-Zip を使って exe のみ取り出しているが、ZIPを解凍し、msi でインストールしてもよい。なお、その場合、実行ファイル(empty.exe)は以下に格納されている。
C:\Program Files (x86)\Windows Resource Kits\Tools

  1. ダウンロードした rktools.exe を 7-Zip で開く
rktool1.png
  1. rktools.msi を 7-Zip で閲覧
rktool2.png
  1. empty.exe を C:\Windows\system32 にコピー
rktool3.png
  1. バッチファイルを作成
rktool4.png 内容は以下の通り。
empty.bat
@echo off
empty.exe *

実行結果

before

使用中メモリ:7.0 GB
rktool_exec_1before.png

after

使用中メモリ:5.6 GB
20% の削減に成功!

rktool_exec_3after.png

番外編:タスクスケジューラに登録

・・・と思ったが、任意に実行するだけで良いので以下のようにした。

番外編:バッチをタスクバーに固定

  1. batch ファイル(empty.bat)を右クリックして、「ショートカットの作成」

  2. 上記ショートカットのプロパティを開く

  3. リンク先の設定
    「ショートカット」タブにある「リンク先」に以下の内容を設定
    C:\Windows\System32\cmd.exe /c [batchファイルのパス]

rktool_cmd_prop3.png
  1. アイコンも変更(個人的嗜好)
    コマンドプロンプトのプロパティの「ショートカット」タブを開き、下の方にある「アイコンの変更」ボタンを押下。
    ここでアラートが挙がっても、無視して「OK」。
    「アイコンの変更」ダイアログボックスで、「このファイル内のアイコンを検索」に、ディスククリーンアップが存在する以下を設定
    %windir%\system32\cleanmgr.exe
    使われてない方の画像を選択
rktool_cmd_prop4.png
  1. 名前の変更(個人的嗜好)
    「全般」タブにて、ショートカットの名前を変更
rktool_cmd_prop5.png
  1. 「OK」でプロパティを閉じる

  2. ショートカットを右クリックして「タスクバーにピン留めする」

last.png

これでもう大丈夫!


18
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?