Deleted Added
full compact
reallocf.3 (26816) reallocf.3 (27152)
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

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

29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE.
35.\"
36.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

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

29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE.
35.\"
36.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
37.\" $Id: malloc.3,v 1.11 1997/06/12 12:45:45 phk Exp $
37.\" $Id: malloc.3,v 1.12 1997/06/22 17:54:27 phk Exp $
38.\"
39.Dd August 27, 1996
40.Dt MALLOC 3
41.Os FreeBSD 2
42.Sh NAME
43.Nm malloc, calloc, realloc, free
44.Nd general purpose memory allocation functions
45.Sh SYNOPSIS

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

114.Fa ptr
115to be made available for future allocations.
116If
117.Fa ptr
118is NULL, no action occurs.
119.Sh TUNING
120Once, when the first call is made to one of these memory allocation
121routines, various flags will be set or reset, which affect the
38.\"
39.Dd August 27, 1996
40.Dt MALLOC 3
41.Os FreeBSD 2
42.Sh NAME
43.Nm malloc, calloc, realloc, free
44.Nd general purpose memory allocation functions
45.Sh SYNOPSIS

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

114.Fa ptr
115to be made available for future allocations.
116If
117.Fa ptr
118is NULL, no action occurs.
119.Sh TUNING
120Once, when the first call is made to one of these memory allocation
121routines, various flags will be set or reset, which affect the
122workings of this alloction implementation.
122workings of this allocation implementation.
123.Pp
124The ``name'' of the file referenced by the symbolic link named
125.Pa /etc/malloc.conf ,
126the value of the environment variable
127.Ev MALLOC_OPTIONS ,
128and the string pointed to by the global variable
129.Va malloc_options
130will be interpreted, in that order, character by character as flags.

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

137All warnings (except for the warning about unknown
138flags being set), and failure to allocate memory become fatal.
139The process will call
140.Fn abort 3
141in these cases.
142.It J
143Each byte of new memory allocated by
144.Fn malloc
123.Pp
124The ``name'' of the file referenced by the symbolic link named
125.Pa /etc/malloc.conf ,
126the value of the environment variable
127.Ev MALLOC_OPTIONS ,
128and the string pointed to by the global variable
129.Va malloc_options
130will be interpreted, in that order, character by character as flags.

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

137All warnings (except for the warning about unknown
138flags being set), and failure to allocate memory become fatal.
139The process will call
140.Fn abort 3
141in these cases.
142.It J
143Each byte of new memory allocated by
144.Fn malloc
145and
145or
146.Fn realloc
146.Fn realloc
147as well as all memory returned by
148.Fn free
149or
150.Fn realloc
147will be initialized to 0xd0.
151will be initialized to 0xd0.
152This options also sets the
153.Dq R
154option.
148This is intended for debugging and will impact performance negatively.
149.It H
150Pass a hint to the kernel about pages unused by the allocation functions.
151This may help performance if the system is paging excessively.
152.It R
153Cause the
154.Fn realloc
155function to always reallocate memory even if the initial allocation was

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

178.Fn abort 3 ).
179This option should be set at compile time by including the following in
180the source code:
181.Bd -literal -offset indent
182extern char *malloc_options;
183malloc_options = "X";
184.Ed
185.It Z
155This is intended for debugging and will impact performance negatively.
156.It H
157Pass a hint to the kernel about pages unused by the allocation functions.
158This may help performance if the system is paging excessively.
159.It R
160Cause the
161.Fn realloc
162function to always reallocate memory even if the initial allocation was

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

185.Fn abort 3 ).
186This option should be set at compile time by including the following in
187the source code:
188.Bd -literal -offset indent
189extern char *malloc_options;
190malloc_options = "X";
191.Ed
192.It Z
186Initialize all allocated memory to nul bytes, and overwrite any
187surrounding memory necessary for alignment reasons with 0xd0 bytes.
193This option implicitly sets the
194.Dq J
195and
196.Dq R
197options, and then zeros out the bytes that were requested.
188This is intended for debugging and will impact performance negatively.
189.It <
190Reduce the size of the cache by a factor of two.
191The default cache size is 16 pages.
192This option can be specified multiple times.
193.It >
194Double the size of the cache by a factor of two.
195The default cache size is 16 pages.

--- 218 unchanged lines hidden ---
198This is intended for debugging and will impact performance negatively.
199.It <
200Reduce the size of the cache by a factor of two.
201The default cache size is 16 pages.
202This option can be specified multiple times.
203.It >
204Double the size of the cache by a factor of two.
205The default cache size is 16 pages.

--- 218 unchanged lines hidden ---