[fpc-pascal] FreePascal Windows - Force files to write to disk
Santiago A.
svaa at ciberpiula.net
Wed Mar 22 09:40:29 CET 2017
El 21/03/2017 a las 15:39, James Richters escribió:
> I should note that these systems are all using Samsung SSDs in them, perhaps
> there is some SSD weirdness going on?
Yes, I think so. SSD is special.
The SSD technology like any flash memories have a limited number of
rewrites, so there are strategies to rewrite as less as possible. In the
case of SSD they are even more aggressive, because they are expensive
.Some of these strategies are implemented in the OS in driver level, but
some in firmware of the device. So, it is possible that OS can't
completely force the real write.
> I also notice it's not just this
> one file that is affected, but EVERY SINGLE FILE I create with freepascal,
Only with freepascal?
Try it for a file generated from command line
echo "test" > filetest.txt
And do the same checks... edit notepad++... turnoff power.... etc
> configured a certain way. I really need these tiny files to survive power
> failures.
Power failures are always a problem for persistent storage. Caching is a
trade-off between speed and security. In the case of SSD there is a
third point: Minimize the real writes on disk. So, if you want security
against power failures, SSD is not the best idea.
By the way. What about a SAI? ;-)
--
Saludos
Santiago A.
svaa at ciberpiula.net
More information about the fpc-pascal
mailing list