Date: Mon, 6 Jan 1997 13:27:00 +0200 (IST) From: Eli Zaretskii To: ronen AT friendly DOT co DOT il cc: djgpp AT delorie DOT com Subject: Re: DOS write buffers & DJGPP? In-Reply-To: <32cfc7cd.31390016@news.netvision.net.il> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 5 Jan 1997, Ronen Friedman wrote: > We've concluded that some internal DOS buffer was filled, and DOS > is dumping it onto our very slow FLASH disk. We tried using > _flush_disk_cache() on convenient times. This reduces the frequency > of the problem, but DOS still feels free to stop everything from time > to time to perform the I/O. `_flush_disk_cache' is only appropriate if you load a disk cache such as SmartDrv on your machine. If not, use `sync' or `fsync'. > Can I control this behaviour? should I do things differently? > Or is our explanation totally wrong? You didn't explain how would you like to ``control this behavior''. After all, the buffers must be flushed from time to time anyway, and the writes to the flash memory *are* slow. So what exactly would you like to accomplish? If you don't need all of the log file, but just its last X Mbytes, you might install a RAM disk of a suitable size and make the log file cyclically re-used.