X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_open.c;h=d09f640daa681c1f2075e4481a54ff6f1b1fc8dd;hp=59526d8b4c3ae3c49582afbd6da2ee440e500123;hb=f01e70ccd0b9bf66255e494fabfb1787c7c7d930;hpb=1eb9f174c8668a68287a1dcb305c1e0da1ae2de2 diff --git a/src/rrd_open.c b/src/rrd_open.c index 59526d8..d09f640 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -259,12 +259,14 @@ rrd_file_t *rrd_open( #ifdef USE_MADVISE if (rdwr & RRD_COPY) { /* We will read everything in a moment (copying) */ - madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL); + madvise(data, rrd_file->file_len, MADV_WILLNEED ); + madvise(data, rrd_file->file_len, MADV_SEQUENTIAL ); } else { /* We do not need to read anything in for the moment */ madvise(data, rrd_file->file_len, MADV_RANDOM); /* the stat_head will be needed soonish, so hint accordingly */ - madvise(data, sizeof(stat_head_t), MADV_WILLNEED | MADV_RANDOM); + madvise(data, sizeof(stat_head_t), MADV_WILLNEED); + madvise(data, sizeof(stat_head_t), MADV_RANDOM); } #endif