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βaddris greater thanTASK_SIZE(which is the limit on the size of the user address space for this architecture). Too big, babes.EINVALβaddris less than or equal to the end of the data segment, or it specifies a value that would cause theRLIMIT_DATAresource 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
- Copyright 2012, Cyrill Gorcunov <gorcunov@gmail.com>
- Copyright 2012-2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms