examples: rewrite graphite

without using SIGALRM and mmap.
The mmaped one has not changed yet.