PR_SET_MM_START_BRK(2const)

πŸ’– PR_SET_MM_START_BRK πŸ’–

okay bestie, so this one lives in the Linux man-pages under the name PR_SET_MM_START_BRK(2const) β€” yes the section is literally (2const), it's giving very niche, very specific, and honestly? we love that for it. It's the page about modifying kernel memory map descriptor fields. Buckle up πŸŽ€


🌸 NAME 🌸

PR_SET_MM_START_BRK β€” modify kernel memory map descriptor fields

πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc) 🫢

✨ SYNOPSIS ✨

#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>

int prctl(PR_SET_MM, PR_SET_MM_START_BRK, unsigned long addr, 0L, 0L);

πŸ’… DESCRIPTION πŸ’…

So what this actually does: it sets the address above which the program heap can be expanded with the brk(2) call. Like, that's the line in the sand, bestie. Above this address = heap can grow. πŸ“

The address has to be greater than the ending address of the current program data segment β€” no lowering the bar, periodt.

And also? The combined size of the resulting heap plus the data segment can't go over the RLIMIT_DATA resource limit (peep setrlimit(2) if you need the tea on that one).

πŸ”₯ RETURN VALUE πŸ”₯

Slay = 0 gets returned. Not slay = -1 gets returned AND errno is set to tell you what went wrong. 😭

πŸ’€ ERRORS πŸ’€

  • EINVAL β€” addr is greater than TASK_SIZE (which is the limit on the size of the user address space for this architecture). Too big, babes.
  • EINVAL β€” addr is less than or equal to the end of the data segment, or it specifies a value that would cause the RLIMIT_DATA resource limit to be exceeded. Either way: invalid, no cap.

πŸ‘‘ STANDARDS πŸ‘‘

Linux. That's it, that's the standard. 🐧

🌈 HISTORY 🌈

Linux 3.3. Vintage-ish, lowkey. πŸ¦‹

πŸ‘€ SEE ALSO πŸ‘€


okay that's the whole vibe πŸŽ€ this was pulled from the Linux man-pages, version 6.20, dated 2026-02-08 πŸ’œ go forth and brk responsibly, bestie, ily ✨

πŸ“¦ 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: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms