MEMCONTROL(8)
π NAME
ok so memcontrol β the whole vibe is controlling how your system cache behaves, but specifically with respect to memory. that's it. that's the girl. π
β¨ SYNOPSIS
memcontrol list [-a]
memcontrol set -b base -l length -o owner attribute
memcontrol clear -o owner
memcontrol clear -b base -l length
πΈ DESCRIPTION
bestie. listen. a bunch of supported system architectures let you program the CPU cache to act differently depending on which region is being written. that's the whole plot. π₯
memcontrol is literally just the interface to that facility β it lets you alter CPU cache behavior for ranges of system physical memory. no cap. β¨
now the fine print, and it's important: these ranges are typically power-of-2 aligned and sized, but the exact rules for how they're allowed to be laid out vary between architectures. memcontrol doesn't try to enforce any of those rules β it's not the hall monitor β but the system will reject any attempt to set an illegal combination. π so like, play nice.
π¦ list
Lists range slots. that's it. show me the slots.
-aβ list all the range slots, even the inactive ones. we love an inclusive queen. π
π set
Sets memory range attributes. this is where you actually do stuff.
-bbase β the memory range base address.-llength β the length of the memory range, in bytes, and it's a power of 2. periodt.-oowner β a text identifier for this setting. watch it: 7 char max. that's a hard limit, i don't make the rules, she does. π- attribute β the attributes applied to this range. it's any combination of
force,uncacheable,write-combine,write-through,write-back, andwrite-protect. yes, mix and match, go off. π
π§ clear
Clears memory range attributes. and here's the cute part β you can clear either by owner or by the base/length combination. two paths, one destination. π
To clear based on ownership:
-oowner β every single range with this owner gets cleared. all of them. she's thorough. β¨
To clear based on the base/length combination:
-bbase β the memory range base address.-llength β the length of the memory range, in bytes, power of 2.
β οΈ okay heads up: base and length must exactly match an existing range. exactly. not "close enough", not "spiritually similar". exact. π
π SEE ALSO
mem(4) β go read it, iykyk π«Ά
mwah, that's the whole page! π this little number is from the Debian crew, dated September 15, 2002, living in the System Manager's Manual as memcontrol(8) β iconic behavior, honestly. ππ¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1999 Chris Costello
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms