prefetch abstract method

void prefetch({
  1. int offset = 0,
  2. int? length,
})

Hints the OS to page in [offset, offset + length) ahead of use.

Windows: PrefetchVirtualMemory; POSIX: madvise(MADV_WILLNEED). Useful for scan/streaming windows; a no-op for an empty range.

Implementation

void prefetch({int offset = 0, int? length});