Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109937707
D15535.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15535.diff
View Options
Index: head/lib/libc/sys/brk.2
===================================================================
--- head/lib/libc/sys/brk.2
+++ head/lib/libc/sys/brk.2
@@ -28,7 +28,7 @@
.\" @(#)brk.2 8.4 (Berkeley) 5/1/95
.\" $FreeBSD$
.\"
-.Dd December 15, 2015
+.Dd May 24, 2018
.Dt BRK 2
.Os
.Sh NAME
@@ -51,6 +51,10 @@
.Fn sbrk
functions are legacy interfaces from before the
advent of modern virtual memory management.
+They are deprecated and not present on the arm64 or riscv architectures.
+The
+.Xr mmap 2
+interface should be used to allocate pages instead.
.Ef
.Pp
The
@@ -152,6 +156,11 @@
.Fn brk
function appeared in
.At v7 .
+.Fx 11.0
+introduced the arm64 and riscv architectures which do not support
+.Fn brk
+or
+.Fn sbrk .
.Sh BUGS
Mixing
.Fn brk
@@ -168,3 +177,9 @@
from a failure caused by exceeding the maximum size of
the data segment without consulting
.Xr getrlimit 2 .
+.Pp
+.Fn sbrk
+is sometimes used to monitor heap use by calling with an argument of 0.
+The result is unlikely to reflect actual utilization in combination with an
+.Xr mmap 2
+based malloc.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 12, 11:51 AM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16610177
Default Alt Text
D15535.diff (1 KB)
Attached To
Mode
D15535: Indicate the brk/sbrk are deprecated and not portable.
Attached
Detach File
Event Timeline
Log In to Comment