IDE Flash Disk Longevity

Hi,

My company has been using DiskOnModules from Nagasaki for the past two years and recently we have discovered we are writing to the device way to much (every second) and we are destroying these things in a matter of months. (They have a limit of 100,000 writes and have wear levelling build in).

We have been sourcing some other manufacturers as well as modifiying our software to write only when we really have to.

I'm writing a test program where I want to write like 5MB at once to the disk, read it back, verify it and keep doing this until destruction of the device. This is in order to test the best product and if in fact any are better than our current Nagasaki provider.

My question is that if I create a 5MB buffer and write it directly to say /dev/hdc1 or something, then read it, is there a way to ensure that this is actually written to the disk and not just cached in memory??

If this is more of a programming question than I'll post elsewhere.

Thanks for any help

Colin Goudie

Reply to
Colin Goudie
Loading thread data ...

try man pages on sync, fsync, or fflush

best regards, Mario

Reply to
Mile Blenton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.