Re: Memory mapping: MAP_PRIVATE and msync()

Liste des GroupesRevenir à cl c  
Sujet : Re: Memory mapping: MAP_PRIVATE and msync()
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.lang.c
Date : 07. Apr 2024, 17:49:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uuufai$2rdn1$1@dont-email.me>
References : 1
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Sun, 07 Apr 2024 13:34:43 +0000, pehache wrote:

Hello,

Hi, pehache

When memory mapping a file with the MAP_PRIVATE flag, the modifications
(writes) only exist in memory and are not written back to the file.
[snip]
So: is there a way to write the changes back to the file?
[snip]

The comp.unix.programmer newsgroup will be of better help for this sort
of question (it's not really on-topic for comp.lang.c).

But, of the top of my head; with my limited understanding of the unix
mmap() kernel call, the only ways to "write the changes" are to either
1) mmap(MAP_SHARED) and modify the mapped area, or
2) write() the mapped area back to the file.

But, as I said, comp.unix.programmer will be of better help.

--
Lew Pitcher
"In Skills We Trust"

Date Sujet#  Auteur
7 Apr 24 * Memory mapping: MAP_PRIVATE and msync()11pehache
7 Apr 24 +* Re: Memory mapping: MAP_PRIVATE and msync()6pehache
7 Apr 24 i+- Re: Memory mapping: MAP_PRIVATE and msync()1pehache
8 Apr 24 i`* Re: Memory mapping: MAP_PRIVATE and msync()4Lawrence D'Oliveiro
8 Apr 24 i +- Re: Memory mapping: MAP_PRIVATE and msync()1Kaz Kylheku
8 Apr 24 i `* Re: Memory mapping: MAP_PRIVATE and msync()2bart
9 Apr 24 i  `- Re: Memory mapping: MAP_PRIVATE and msync()1Lawrence D'Oliveiro
7 Apr 24 `* Re: Memory mapping: MAP_PRIVATE and msync()4Lew Pitcher
7 Apr 24  `* Re: Memory mapping: MAP_PRIVATE and msync()3pehache
8 Apr 24   `* Re: Memory mapping: MAP_PRIVATE and msync()2pehache
8 Apr 24    `- fu2 is fne (Was: Memory mapping: =?UTF-8?Q?MAP=5FPRIVATE=20and=20msync=28=29?=)1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal