diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2018-05-31 16:10:44 +0000 | 
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2018-05-31 16:10:44 +0000 | 
| commit | 2ee8c153e2d045fdc3f53fc1b0a66cd4448ad5b5 (patch) | |
| tree | 9d08000580242f114344fbd0ac748e6c510088ce /lib/libc | |
| parent | 076e25f3783415f20a0d90ebdc18bea2dcba035e (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/sys/brk.2 | 18 | ||||
| -rw-r--r-- | lib/libc/sys/getgid.2 | 3 | ||||
| -rw-r--r-- | lib/libc/sys/getpid.2 | 3 | ||||
| -rw-r--r-- | lib/libc/sys/read.2 | 3 | ||||
| -rw-r--r-- | lib/libc/sys/write.2 | 3 | 
5 files changed, 20 insertions, 10 deletions
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2 index 31dea32a0923f..0eb61d582cbfa 100644 --- a/lib/libc/sys/brk.2 +++ b/lib/libc/sys/brk.2 @@ -28,7 +28,7 @@  .\"     @(#)brk.2	8.4 (Berkeley) 5/1/95  .\" $FreeBSD$  .\" -.Dd July 12, 1999 +.Dd May 24, 2018  .Dt BRK 2  .Os  .Sh NAME @@ -38,7 +38,6 @@  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS -.In sys/types.h  .In unistd.h  .Ft int  .Fn brk "const void *addr" @@ -52,6 +51,10 @@ and  .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 @@ -153,6 +156,11 @@ The  .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 @@ -169,3 +177,9 @@ It is not possible to distinguish this  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. diff --git a/lib/libc/sys/getgid.2 b/lib/libc/sys/getgid.2 index b03040bdf0076..5bd2a94b9dc10 100644 --- a/lib/libc/sys/getgid.2 +++ b/lib/libc/sys/getgid.2 @@ -28,7 +28,7 @@  .\"     @(#)getgid.2	8.1 (Berkeley) 6/4/93  .\" $FreeBSD$  .\" -.Dd June 4, 1993 +.Dd December 15, 2015  .Dt GETGID 2  .Os  .Sh NAME @@ -38,7 +38,6 @@  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS -.In sys/types.h  .In unistd.h  .Ft gid_t  .Fn getgid void diff --git a/lib/libc/sys/getpid.2 b/lib/libc/sys/getpid.2 index aefa7708e7ca7..ab69f7117aebf 100644 --- a/lib/libc/sys/getpid.2 +++ b/lib/libc/sys/getpid.2 @@ -28,7 +28,7 @@  .\"     @(#)getpid.2	8.1 (Berkeley) 6/4/93  .\" $FreeBSD$  .\" -.Dd November 2, 2006 +.Dd December 15, 2015  .Dt GETPID 2  .Os  .Sh NAME @@ -38,7 +38,6 @@  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS -.In sys/types.h  .In unistd.h  .Ft pid_t  .Fn getpid void diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index e99665fa6b2f5..a0a7be838c0bb 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -28,7 +28,7 @@  .\"     @(#)read.2	8.4 (Berkeley) 2/26/94  .\" $FreeBSD$  .\" -.Dd September 11, 2013 +.Dd December 15, 2015  .Dt READ 2  .Os  .Sh NAME @@ -40,7 +40,6 @@  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS -.In sys/types.h  .In unistd.h  .Ft ssize_t  .Fn read "int fd" "void *buf" "size_t nbytes" diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index a06e7c9d89f64..0bfe56530f7c9 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -28,7 +28,7 @@  .\"     @(#)write.2	8.5 (Berkeley) 4/2/94  .\" $FreeBSD$  .\" -.Dd September 11, 2013 +.Dd December 15, 2015  .Dt WRITE 2  .Os  .Sh NAME @@ -40,7 +40,6 @@  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS -.In sys/types.h  .In unistd.h  .Ft ssize_t  .Fn write "int fd" "const void *buf" "size_t nbytes"  | 
