Tuesday, 15 June 2010

c - Using read() and write() system calls to access mmapped() memory -



c - Using read() and write() system calls to access mmapped() memory -

i wish inquire whether possible implement mread() function using scheme calls such read() , write(). know standard c library functions such fread() , fwrite() utilize type of buffer read. want same time want read() , write() buffer memory mapped part , vice versa. illustration mread() wants read memory map , store buffer. create sense create new fd utilize temporary buffer. utilize read() read memory mapped part fd..and utilize write() store contents in fd actual buff. hope clear :) ..thank help!

i hope clear

unfortunately, not very. sounds want utilize pipe scheme call. opens 2 fds. whatever's written on write end can read on read end. if you're doing of in single thread have careful though, because might run out of buffer space , read/write phone call hang indefinitely.

c linux mmap

No comments:

Post a Comment