You are mistaken. The PlaceNtfsSystemFiles() action will create a gap after the MFT, not after the last file in that zone. But MyDefrag cannot guarantee that the gap will not be used by another program for a new file, so it is not guaranteed that Windows will place the reserved zone there after a reboot. For more information see the
PlaceNtfsSystemFiles manpage.
The gap is marked blue, and on every test that I made the program never used this space for any file. It's name is not 'Empty space', but 'Reserved NTFS zone'. I understand what you said, and yes, I tried to leave a short time from the end of the defrag to a system reboot. Every time when I only used this code (notice the explicit exclusion of the other NtfsSystemFiles), I correctly managed to get this reserved NTFS zone exacty after $MFT
FileSelect
SelectNtfsSystemFiles(yes) AND FileName("$MFT")
FileActions
PlaceNtfsSystemFiles(Ascending, MftSize * 0.300)
FileEnd
What I mean that PlaceNtfsSystemFiles did by using only "SelectNtfsSystemFiles(yes)" is: first it placed all the NtfsSystemFiles alphabetically, and the it made the gap for the reserved NTFS zone. Check by zooming in at the place used for this files, and you will find their order is:
$AttrDef
$MFT
$Secure:$SDH:$INDEX_ALLOCATION
$Secure:$SDS:$DATA
$Secure:$SII:$INDEX_ALLOCATION
$UpCase
$Extend\$ObjId:$O:$INDEX_ALLOCATION
Reserved NTFS Zone
As you can see and check with your own system, $MFT will never be the last file, as the program is using only alphabetical order, and the Reserved NTFS Zone is always following all selected files. Whichever order you choose, $MFT is not besides a gap, and then the Reserved Zone will not get reallocated.
By using "SelectNtfsSystemFiles(yes) AND FileName("$MFT")", I managed to solve this situation: the program alocated only $MFT and then a gap. Doing this and then rebooting, my test systems marked the gap as the Reserved NTFS Zone.
Regards,
Luis José.