This program provides an easy way to test whether TRIM works on your SSD. It uses a similar method to the one described here, but uses sector calculations to avoid searching the entire drive for the sought pattern. It also pads the sought data with 32MB blocks of dummy data, to give some room to processes which may otherwise overwrite the tested deleted disk area.
The program will set up a test by creating and deleting a file with unique contents, then (on the second run) checks if the data is still accessible at the file's previous location.
You can download a compiled version on my website, here.
Place this program file on the same drive you'd like to test TRIM on, and run it. Administrator privileges and at least 64MB free disk space will be required.
A D compiler is required.
You can use the rdmd
tool (included with DMD) to build trimcheck
:
$ git clone --recursive https://github.com/CyberShadow/trimcheck
$ cd trimcheck
$ rdmd --build-only trimcheck
trimcheck
is available under the Mozilla Public License, version 2.0.