brk.2 (89732) | brk.2 (108028) |
---|---|
1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)brk.2 8.4 (Berkeley) 5/1/95 | 1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)brk.2 8.4 (Berkeley) 5/1/95 |
33.\" $FreeBSD: head/lib/libc/sys/brk.2 89732 2002-01-24 12:11:31Z dwmalone $ | 33.\" $FreeBSD: head/lib/libc/sys/brk.2 108028 2002-12-18 09:22:32Z ru $ |
34.\" 35.Dd July 12, 1999 36.Dt BRK 2 37.Os 38.Sh NAME 39.Nm brk , 40.Nm sbrk 41.Nd change data segment size --- 81 unchanged lines hidden (view full) --- 123.Fn sbrk 124function returns the prior break value if successful; 125otherwise the value 126.Po Vt "void *" Pc Ns \-1 127is returned and the global variable 128.Va errno 129is set to indicate the error. 130.Sh ERRORS | 34.\" 35.Dd July 12, 1999 36.Dt BRK 2 37.Os 38.Sh NAME 39.Nm brk , 40.Nm sbrk 41.Nd change data segment size --- 81 unchanged lines hidden (view full) --- 123.Fn sbrk 124function returns the prior break value if successful; 125otherwise the value 126.Po Vt "void *" Pc Ns \-1 127is returned and the global variable 128.Va errno 129is set to indicate the error. 130.Sh ERRORS |
131The |
|
131.Fn brk | 132.Fn brk |
132or | 133and |
133.Fn sbrk | 134.Fn sbrk |
135functions |
|
134will fail if: 135.Bl -tag -width Er 136.It Bq Er EINVAL 137The requested break value was beyond the beginning of the data segment. 138.It Bq Er ENOMEM 139The data segment size limit, as set by 140.Xr setrlimit 2 , 141was exceeded. --- 20 unchanged lines hidden (view full) --- 162.Pp 163Setting the break may fail due to a temporary lack of 164swap space. 165It is not possible to distinguish this 166from a failure caused by exceeding the maximum size of 167the data segment without consulting 168.Xr getrlimit 2 . 169.Sh HISTORY | 136will fail if: 137.Bl -tag -width Er 138.It Bq Er EINVAL 139The requested break value was beyond the beginning of the data segment. 140.It Bq Er ENOMEM 141The data segment size limit, as set by 142.Xr setrlimit 2 , 143was exceeded. --- 20 unchanged lines hidden (view full) --- 164.Pp 165Setting the break may fail due to a temporary lack of 166swap space. 167It is not possible to distinguish this 168from a failure caused by exceeding the maximum size of 169the data segment without consulting 170.Xr getrlimit 2 . 171.Sh HISTORY |
170A | 172The |
171.Fn brk | 173.Fn brk |
172function call appeared in | 174function appeared in |
173.At v7 . | 175.At v7 . |