Mercurial > hg > Papers > 2014 > masakoha-thesis > final
changeset 17:2d1060de4dfe
write divide read の実装
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 29 Jan 2014 18:29:16 +0900 |
parents | 56cd6800acb5 |
children | e735ac7509c6 |
files | slide/index.html |
diffstat | 1 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/slide/index.html Wed Jan 29 17:32:39 2014 +0900 +++ b/slide/index.html Wed Jan 29 18:29:16 2014 +0900 @@ -176,20 +176,33 @@ <li> 明示的な read </li> - <li> 先読みを自分で書ける(制御できる) </li> - <li> code が煩雑 </li> - <li> memory より大きなファイルを扱える </li> </ul> </article> + <article> + <h3>divide read の実装(1)</h3> + <br> + <h3 class="yellow">Task の記述</h3> + <pre> +mmap(SchedTask *s, void *in, void *out) +{ + FileReadPtr fr = (FileReadPtr)in; + int map = MAP_PRIVATE; + + fr->read_text = + (char*)mmap(NULL,fr->filesize,PROT_READ,map,fr->fd,(off_t)0); +} +</pre> + </article> + </body> </html>