I've wanted this a couple of times in the past. Save the memattr in
the fictitious memory segment structure so that we can report it from
the sysctl handler, and add conversion routines for each platform.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/vm/vm_phys.c | ||
|---|---|---|
| 372 | The why not return "???" from vm_memattr_name()? I would print the numeric value of the unknown memattr. | |
| sys/vm/vm_phys.c | ||
|---|---|---|
| 372 |
Returning NULL indicates that the memattr was not decoded, it seems better to give that extra information to the caller and let them decide how to handle it.
Ok | |
| sys/vm/vm_phys.c | ||
|---|---|---|
| 374 | I suspect that the width 2 is too narrow, since '0x' from '#' counts there. | |