llama_supports_mlock: Check whether memory locking is supported

View source: R/llama.R

llama_supports_mlockR Documentation

Check whether memory locking is supported

Description

Check whether memory locking is supported

Usage

llama_supports_mlock()

Value

A logical scalar: TRUE if mlock is supported.

Examples

# Check if memory locking is available (prevents swapping model to disk)
if (llama_supports_mlock()) {
  message("mlock available — model weights can be pinned in RAM")
}

llamaR documentation built on May 28, 2026, 1:06 a.m.