Deleted Added
full compact
brk.2 (21907) brk.2 (23660)
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.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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.\"
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.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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.2 (Berkeley) 12/11/93
32.\" @(#)brk.2 8.4 (Berkeley) 5/1/95
33.\"
33.\"
34.Dd December 11, 1993
34.Dd May 1, 1995
35.Dt BRK 2
36.Os BSD 4
37.Sh NAME
38.Nm brk ,
39.Nm sbrk
40.Nd change data segment size
41.Sh SYNOPSIS
42.Fd #include <sys/unistd.h>

--- 48 unchanged lines hidden (view full) ---

91.Em data
92segment;
93it will not be possible to set the break
94beyond the
95.Em rlim_max
96value returned from a call to
97.Xr getrlimit 2 ,
98e.g.
35.Dt BRK 2
36.Os BSD 4
37.Sh NAME
38.Nm brk ,
39.Nm sbrk
40.Nd change data segment size
41.Sh SYNOPSIS
42.Fd #include <sys/unistd.h>

--- 48 unchanged lines hidden (view full) ---

91.Em data
92segment;
93it will not be possible to set the break
94beyond the
95.Em rlim_max
96value returned from a call to
97.Xr getrlimit 2 ,
98e.g.
99.Dq qetext + rlp\(->rlim_max.
99.Dq etext + rlp\(->rlim_max.
100(see
101.Xr end 3
102for the definition of
103.Em etext ) .
104.Sh RETURN VALUES
105.Fn Brk
106returns 0 if successful;
107otherwise -1 with
108.Va errno
109set to indicate why the allocation failed.
110The
111.Fn sbrk
112function returns a pointer to the base of the new storage if successful;
113otherwise -1 with
114.Va errno
115set to indicate why the allocation failed.
116.Sh ERRORS
100(see
101.Xr end 3
102for the definition of
103.Em etext ) .
104.Sh RETURN VALUES
105.Fn Brk
106returns 0 if successful;
107otherwise -1 with
108.Va errno
109set to indicate why the allocation failed.
110The
111.Fn sbrk
112function returns a pointer to the base of the new storage if successful;
113otherwise -1 with
114.Va errno
115set to indicate why the allocation failed.
116.Sh ERRORS
117.Fn Sbrk
117.Fn Brk
118or
119.Fn sbrk
118will fail and no additional memory will be allocated if
119one of the following are true:
120.Bl -tag -width [ENOMEM]
121.It Bq Er ENOMEM
122The limit, as set by
123.Xr setrlimit 2 ,
124was exceeded.
125.It Bq Er ENOMEM

--- 22 unchanged lines hidden ---
120will fail and no additional memory will be allocated if
121one of the following are true:
122.Bl -tag -width [ENOMEM]
123.It Bq Er ENOMEM
124The limit, as set by
125.Xr setrlimit 2 ,
126was exceeded.
127.It Bq Er ENOMEM

--- 22 unchanged lines hidden ---