-#ifdef HAVE_MMAP
- memmove(&rrd->live_head->last_up, data + offset, sizeof(long));
- offset += sizeof(long);
-#else
- offset += read(rrd_file->fd, &rrd->live_head->last_up, sizeof(long));
-#endif
+
+#if defined USE_MADVISE
+ /* the live_head will be needed soonish, so hint accordingly */
+ madvise(data + PAGE_START(offset),
+ sizeof(time_t), MADV_WILLNEED);
+#endif
+ __rrd_read(rrd->legacy_last_up,time_t,1);
+ rrd->live_head->last_up = *rrd->legacy_last_up;