PROPHET/OS

NAME

memory: the three pots of memory, and none is the sum of another

SYNOPSIS

memory [--map] [--tui]

DESCRIPTION

The three pots of memory, and none is the sum of another.

frames is the physical memory the kernel hands out in pages of four KiB. heap is what kmalloc holds, inside frames it took from there. stacks is what the runs stand on. A share above eighty is red.

Count carries the one number each pot is really asked about: for frames the reach, for the heap what is open right now, for the stacks how many runs they carry.

Without an argument the lines once, so a pipe gets numbers. --tui takes the whole screen and keeps them live, with a bar over the share; q leaves.

Under the table stands **the map of the memory**: one cell over a piece of it, and the piece follows from the machine, so the legend says how much a cell carries. The colour says what the cell mostly is and the character how much of it that is: green is provably zero, blue is free and nobody has read it yet, yellow is partly handed out, red is handed out whole. The characters are ░▒▓█, so the map is readable without colour, and the lines shape prints the same one.

The line under it carries the numbers of the claim: how much of the free memory is provably zero, how many rounds the patrol has finished, and how many pages said zero and were not. The last number is a finding: either a path booked wrong or a bit flipped.

It replaced free and mem on 2026-10-02. free printed byte for byte what mem free printed, so nothing was lost. The ECC counters that stood behind mem edac are in edac now, with the other hardware views.

Who holds the frames

Under frames stand the holders, indented, one row per thing: heap, tables, kernel, images, runs, packed, stacks, and last rest.

Every column means one thing in every row, and that cost three turns to get right:

| column | | |---|---| | Total | what this holds of the machine | | Used | what is handed out inside it, where that question holds | | Free | Total minus Used, likewise | | Share | Total of the usable memory of the machine | | Inside | Used of Total | | Frames | frames, in every row | | Note | the one word this row is asked about, with its own number |

A row for which a question does not hold leaves the field **empty**, and an empty field is not a zero: none and does not apply are different answers. heap and stacks stood twice until 2026-10-08, once as a pot and once as a holder, which is one thing answering two questions.

Not one new count stands behind it. Every holder counts itself already, so the line asks each of them and subtracts: kernel is the pot of the frame stock minus the heap and the tables, which both take their frames out of that pot, and rest is what is held minus all of them together.

**The rest is the point.** A number with no name on it is where to look, and on the standard machine it is the larger half: 15,6 MiB held, 7,5 named, 8,1 with no name (R11-LEER-01).

Under frames stands zeroed as well, and it is about the **free** half: what the patrol has proven to be zero, its share of the machine and its share of what is free, with the rounds it has finished in the note. A page that said zero and was not is a finding, so the note says wrong N instead.

The colours of the table

One scale, and it says how full a thing is, out of Inside:

| | | |---|---| | green | in order, up to sixty of its own total | | yellow | getting close, up to eighty | | red | over eighty | | purple | carries more than it holds, above a hundred |

Purple is not a fourth degree of bad: green to red says how full, and a pot that carries more than it occupies is a different statement, so it stands off the scale. The cold store is the one that makes it, and making it is what the store is for.

**A finding is a word and not a temperature.** What nothing can place stands as unplaced in the note and a page that said zero and was not as wrong N, instead of taking a colour that already means how full something is. A row whose fullness is no question gets no colour at all, and leaves Used, Free and Inside empty with it.

frame.the_named_holders_never_claim_more_than_is_held holds the sum, so the subtraction cannot go below zero and report a defect as a holder of nothing.

The map is asked for with --map and not given by itself. It costs sixteen calls into the kernel per picture, and the live shape pays them every second.

The colours run from good to gone, and two of them stand reserved with a name on them:

| | | |---|---| | grey | free, and nobody has read it | | green | free and provably zero, the better free | | yellow | handed out and costing full frames | | red | **reserved**: handed out and lying packed in the cold store. Red because a page that had to be compressed says the machine is squeezing, which is worse than a page merely handed out | | cyan | **reserved**: encrypted in the memory itself, which is TME |

A colour with a name on it that nothing draws is better than one somebody takes for something else next week. Red waits on the cold store handing its frames along, which is a step in its contract; cyan on TME carrying.

The legend writes each word **in** its colour and does not name the colour beside it: zeroed in green is the thing, green zeroed makes the reader map one onto the other.

Until 2026-10-08 the colour used four names for three states, green zeroed, blue free, and yellow **and** red both handed out, parted by how much. How much is what the character says, so one of the two was spent twice.

In lines there is no colour: the board writes none into them. So there the character carries what a cell is, . free, o zeroed, # uncompressed, * compressed, and the legend says that. It named four colours that were not there until the user found it.

EXAMPLE

$ memory
Pot            Total       Used       Free  Share Inside  Frames Note
frames      15.9 GiB   13.8 MiB   15.9 GiB   100%     0%    3536 reserved 5244
  zeroed    21.2 MiB   21.2 MiB        0 B     0%     0%    5447 rounds 0
  start      4.0 MiB                           0%           1036
  heap       3.7 MiB    3.2 MiB  464.4 KiB     0%    87%     960 open 422
  tables     444 KiB                           0%            111
  kernel     172 KiB                           0%             43
  images     3.0 MiB                           0%            789
  devices    396 KiB                           0%             99
  runs       1.1 MiB                           0%            290
  packed         0 B        0 B                0%     0%       0 lz4
  stacks     540 KiB    540 KiB        0 B     0%   100%     135 runs 35
  pools          0 B        0 B        0 B     0%     0%       0 pools 0
  mstacks    244 KiB                           0%             61
  rest        48 KiB                           0%             12 unplaced
  nailed         0 B        0 B        0 B     0%     0%       0 regions 0

SEE ALSO

edac, top, runs