memcontrol(8)

memcontrol8

Control system cache behaviour with respect to memory

Usage

memcontrol list [-a]

memcontrol set -b base -l length -o owner attribute

memcontrol clear -o owner

memcontrol clear -b base -l length

Overview

A number of supported system architectures allow the behaviour of the CPU cache to be programmed to behave differently depending on the region being written.

The memcontrol utility provides an interface to this facility, allowing CPU cache behavior to be altered for ranges of system physical memory.

These ranges are typically power-of-2 aligned and sized, however the specific rules governing their layout vary between architectures. The memcontrol utility does not attempt to enforce these rules, however the system will reject any attempt to set an illegal combination.

list

List range slots.

-a

List all range slots, even those that are inactive.

set

Set memory range attributes.

-b base

Memory range base address.

-l length

Length of memory range in bytes, power of 2.

-o owner

Text identifier for this setting (7 char max).

attribute

Attributes applied to this range; combinations of force, uncacheable, write-combine, write-through, write-back, and write-protect.

clear

Clear memory range attributes. Ranges may be cleared by owner or by base/length combination.

To clear based on ownership:

-o owner

All ranges with this owner will be cleared.

To clear based on the base/length combination:

-b base

Memory range base address.

-l length

Length of memory range in bytes, power of 2.

Base and length must exactly match an existing range.

Releases

73 releases since FreeBSD 3.4-RELEASE; the text changed 39 times.

  1. 3.4
  2. 3.5–3.5.1
  3. 4.0–4.2
  4. 4.3
  5. 4.4–4.6.2
  6. 4.7
  7. 4.8–4.11
  8. 5.0–6.3
  9. 6.4
  10. 7.0
  11. 7.1
  12. 7.2
  13. 7.3
  14. 7.4
  15. 8.0
  16. 8.1
  17. 8.2
  18. 8.3
  19. 8.4
  20. 9.0
  21. 9.1
  22. 9.2
  23. 9.3
  24. 10.0
  25. 10.1
  26. 10.2
  27. 10.3
  28. 10.4
  29. 11.0
  30. 11.1
  31. 11.2
  32. 11.3
  33. 11.4
  34. 12.0
  35. 12.1
  36. 12.2
  37. 12.3
  38. 12.4
  39. 13.0–13.2
  40. 13.3–16.0

-a since FreeBSD 4.8-RELEASE.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.