text: simplify remapping of original file content
commit4758050b2d5caeb61fa9536bfb1a738d6f35cc86
authorMarc André Tanner <mat@brain-dump.org>
Sun, 28 Jun 2020 07:57:13 +0000 (28 09:57 +0200)
committerMarc André Tanner <mat@brain-dump.org>
Sun, 28 Jun 2020 07:57:13 +0000 (28 09:57 +0200)
tree0dd269e1432c8d92871940a900027fcab9a4b135
parent1b4eb9853797ac928ed178ad3941662f00fe2658
text: simplify remapping of original file content

Use mmap with MAP_FIXED which replaces existing mappings without any
race conditions between the munmap/mmap calls.
text.c