Capabilities · 5 of 7
Where a process’s slot budget runs out
A full table holds 65,024 capabilities. That bounds how much memory a process can hold only when it holds memory as many small, separate blocks, and the bound depends on the block size.
The budget
A process’s table has a root of 512 entries, and each leaf under it has 127 slots, so a full table holds 65,024. The table starts with no leaf and gains slots a leaf at a time.11 ROOT_ENTRIES in table.rs and NODES_PER_PAGE in list.rs, less each leaf’s hidden node. The design record is process-holds-capabilities. Since one capability names a whole block of memory, the budget binds only when a process spends its slots one to a block.
One slot per block, at each size
- 4 KiB frames. One slot per page over a full table reaches 254 MiB.
- 2 MiB frames. One slot per large frame reaches 127 GiB.
- 1 GiB blocks. One slot per block would reach 65,024 GiB, about 63.5 TiB. The system call cannot retype a 1 GiB frame yet, but the plot draws the line.22
can_retype_largeinretype.rsaccepts order 18, andallows_retypeinoperation.rsdoes not pass it.
Each reach is the table’s slots times the block size, or the 256 TiB address space if that is smaller; at these three sizes the table always runs out first.
Untyped memory is different. An untyped capability may take any order up to 36, and an order-36 block is the whole address space, so one slot can cover all of it. The memory boot hands out arrives in runs, and a run lying inside the pages the kernel tracks breaks into at most 74 aligned blocks, far below the table’s 65,024.33 lemma_run_blocks in decompose.rs proves the bound of 74. How boot uses it is the last page of this section.
Each diagonal is one capability per block of one size: the slots needed are the memory held divided by the block. The dot is where that size reaches the full table. Past a dot, a process cannot hold its memory as separate blocks of that size, but a larger frame, or an untyped block, still covers it. The dashed lines are the 74-block bound for one run of untyped memory and the edge of the address space.
What that means for a pager
The bound that matters in practice is the 4 KiB line: a process that receives every page as its own frame capability runs out at 254 MiB. A pager avoids it by handing out larger frames and letting the process map pages by offset inside them, which takes no slot, or by keeping the frames itself and mapping on the process’s behalf. What takes a slot lists the operations behind each choice, and growing the table weighs what it would cost to raise the budget itself.
Numbers on this page are from kernel commit 31399c5, 17 November 2026.