segment_advise: Advise OS about expected access pattern for a segment

View source: R/affinity.R

segment_adviseR Documentation

Advise OS about expected access pattern for a segment

Description

This calls madvise() on the segment mapping when available.

Usage

segment_advise(
  seg,
  advice = c("normal", "sequential", "random", "willneed", "dontneed")
)

Arguments

seg

A shard_segment.

advice

One of "normal", "sequential", "random", "willneed", "dontneed".

Value

A logical scalar; TRUE if the OS accepted the hint.

Examples


seg <- segment_create(1024)
segment_advise(seg, "sequential")


shard documentation built on April 3, 2026, 9:08 a.m.