Sujet : Re: Question regarding fwrite() and fflush()
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 25. Jun 2024, 23:54:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5fhs2$1ot2o$2@dont-email.me>
References : 1
User-Agent : Pan/0.158 (Avdiivka; )
On Tue, 25 Jun 2024 18:42:55 -0000 (UTC), Lew Pitcher wrote:
In a recent reply here, I posted some code that used fwrite() to write
binary data to a file. One version of this code used mmap() to access
this binary data in-situ, and I wonder if I should have called fflush()
before calling mmap().
Yes.
Whether the data is buffered or not, is independent of whether the data is
text or not.