proc_buddyinfo(5)

๐Ÿ’– proc_buddyinfo(5) โ€” the group chat edition

okay bestie, so this is proc_buddyinfo(5) โ€” a File Formats Manual page, section 5, all about one very specific little file that lives in /proc. no cap, it's niche but it's iconic. ๐Ÿ’…


โœจ NAME โœจ

/proc/buddyinfo โ€” memory fragmentation ๐Ÿงฉ


๐ŸŒธ DESCRIPTION ๐ŸŒธ

๐Ÿซถ /proc/buddyinfo

so this file is giving diagnostic queen ๐Ÿ’… โ€” it's literally the file you go look at when you're trying to figure out why memory is all fragmented and messy.

Here's the vibe of every line: it starts with the identification of the node plus the name of the zone, and those two together identify a memory region. then, after that, you get the count of available chunks of a certain order โ€” the orders being the sizes your zones get split into.

and the size in bytes of any given order? it's this little formula, super simple, no drama:

(2^order) * PAGE_SIZE

so what's actually happening under the hood: the binary buddy allocator algorithm inside the kernel is out here splitting one chunk into two chunks of a smaller order (so, half the size each) โ€” or doing the reverse, combining two contiguous chunks into one larger chunk of a higher order (so, double the size). it does all this to satisfy allocation requests and to counter memory fragmentation. main character energy tbh. โœจ

and the order matches the column number, when you start counting at zero. yes, zero. programmers, am I right ๐Ÿ˜ญ

for example, on an x86-64 system:

Node 0, zone     DMA     1    1    1    0    2    1    1    0    1    1    3
Node 0, zone   DMA32    65   47    4   81   52   28   13   10    5    1  404
Node 0, zone  Normal   216   55  189  101   84   38   37   27    5    3  587

so in this example: there is one node containing three zones, and there are 11 different chunk sizes. ๐Ÿซก

if the page size is 4 kilobytes, then the first zone โ€” the one called DMA (on x86 that's the first 16 megabyte of memory) โ€” has 1 chunk of 4 kilobytes available (that's order 0) and has 3 chunks of 4 megabytes available (that's order 10). see how the column-to-order thing works? cute. ๐ŸŽ€

โš ๏ธ and here's the sad part, bestie: if the memory is heavily fragmented, the counters for the higher order chunks will be zero, and allocation of large contiguous areas will fail. ๐Ÿ’€ like it's over. not a vibe.

if you want the further lore about the zones themselves, that's all in /proc/zoneinfo. go read it, iykyk. ๐Ÿฆ‹


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


and that's the page, bestie!! ๐Ÿ’œ mwah. this one came from Linux man-pages 6.20, dated 2026-02-08 โ€” so you know it's fresh. slay โœจ๐ŸŽ€๐Ÿซถ

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-3.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms