[转载] reverse mmap ???# Unix - 噫吁兮,危乎高哉
c*n
1 楼
【 以下文字转载自 Linux 讨论区 】
【 原文由 creation 所发表 】
I want to map a certain continous section of a file to another file
that is, a more sofisticated "ln"
for example
ln -start MY_START_OFFSET -stop MY_STOP_OFFSET old_big_file small_file_section
of course I could dd , but that costs unnecessary file copy.
is there a way to do a reverse mmap?
so I mmap the big file into memory,
then reverse_mmap() a section to another file ????
Thanks!
【 原文由 creation 所发表 】
I want to map a certain continous section of a file to another file
that is, a more sofisticated "ln"
for example
ln -start MY_START_OFFSET -stop MY_STOP_OFFSET old_big_file small_file_section
of course I could dd , but that costs unnecessary file copy.
is there a way to do a reverse mmap?
so I mmap the big file into memory,
then reverse_mmap() a section to another file ????
Thanks!