summaryrefslogtreecommitdiff
path: root/src/clickety.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-03-21 17:08:03 -0700
committerVito Caputo <vcaputo@gnugeneration.com>2017-03-21 17:08:03 -0700
commit21cdd99c77dd4dcc20c2c1a6a8868aef8e9285dc (patch)
tree2ec582333470b9f1593fb4a0e294b2ee153f3680 /src/clickety.c
parent872fcd6219bb2d01685e4a3c5828c6f8789681c9 (diff)
libvmon: use pread() instead of lseek()+read()
I had assumed pread wouldn't work on /proc files and that lseek to the start was the only safe form of seeking, but this seems to be working acceptably well even with buffer sizes of 2 requiring many sequential reads per sample. The lseek syscalls aren't free and it's nice to omit them entirely, and we're essentially being sequential in our pread() use, and always use a buffer that is large enough to fit everything in the first read anyways.
Diffstat (limited to 'src/clickety.c')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved