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

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

89system call may be used to determine
90the maximum permissible size of the
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
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.

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

89system call may be used to determine
90the maximum permissible size of the
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 ,
97.Xr getrlimit 2 ,
98e.g.
99.Dq qetext + rlp\(->rlim_max.
100(see
101.Xr end 3
102for the definition of
103.Em etext ) .
104.Sh RETURN VALUES
105.Nm Brk
106returns 0 if successful;
107otherwise -1 with
108.Va errno
109set to indicate why the allocation failed.
110The
111.Nm sbrk
112returns 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
98e.g.
99.Dq qetext + rlp\(->rlim_max.
100(see
101.Xr end 3
102for the definition of
103.Em etext ) .
104.Sh RETURN VALUES
105.Nm Brk
106returns 0 if successful;
107otherwise -1 with
108.Va errno
109set to indicate why the allocation failed.
110The
111.Nm sbrk
112returns 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.Xr Sbrk
117.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

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

134.Xr getrlimit 2 ,
135.Xr malloc 3 ,
136.Xr end 3
137.Sh BUGS
138Setting the break may fail due to a temporary lack of
139swap space. It is not possible to distinguish this
140from a failure caused by exceeding the maximum size of
141the data segment without consulting
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

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

134.Xr getrlimit 2 ,
135.Xr malloc 3 ,
136.Xr end 3
137.Sh BUGS
138Setting the break may fail due to a temporary lack of
139swap space. It is not possible to distinguish this
140from a failure caused by exceeding the maximum size of
141the data segment without consulting
142.Xr getrlimit .
142.Xr getrlimit 2 .
143.Sh HISTORY
144A
145.Nm
146function call appeared in Version 7 AT&T UNIX.
143.Sh HISTORY
144A
145.Nm
146function call appeared in Version 7 AT&T UNIX.