Deutsch   English   Français   Italiano  
<v5fhs2$1ot2o$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.c
Subject: Re: Question regarding fwrite() and fflush()
Date: Tue, 25 Jun 2024 22:54:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <v5fhs2$1ot2o$2@dont-email.me>
References: <v5f33f$1l548$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jun 2024 00:54:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d3e70b79bcb23d33c66caba9f2139d60";
	logging-data="1864792"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18JkeLniX5WJi2jVesa7PDC"
User-Agent: Pan/0.158 (Avdiivka; )
Cancel-Lock: sha1:xeN/AvJpbITAVkhG8XxPCMw81mg=
Bytes: 1357

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.