9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3c / end.3c
blob27e08e521cb67ee5732923a766c76a0aca1c11b6
1 '\" te
2 .\" Copyright 1989 AT&T.
3 .\" Copyright (c) 2006, Sun Microsystems, Inc.  All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH END 3C "Mar 31, 2006"
8 .SH NAME
9 end, _end, etext, _etext, edata, _edata \- last locations in program
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBextern int \fR\fI_etext\fR\fB;\fR
14 .fi
16 .LP
17 .nf
18 \fBextern int \fR\fI_edata\fR\fB;\fR
19 .fi
21 .LP
22 .nf
23 \fBextern int \fR\fI_end\fR\fB;\fR
24 .fi
26 .SH DESCRIPTION
27 .sp
28 .LP
29 These names refer neither to routines nor to locations with interesting
30 contents; only their addresses are meaningful.
31 .sp
32 .ne 2
33 .na
34 \fB\fB_etext\fR\fR
35 .ad
36 .RS 10n
37 The address of \fB_etext\fR is the first location after the last read-only
38 loadable segment.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fB_edata\fR\fR
45 .ad
46 .RS 10n
47 The address of \fB_edata\fR is the first location after the last read-write
48 loadable segment.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fB_end\fR\fR
55 .ad
56 .RS 10n
57 If the address of \fB_edata\fR is greater than the address of \fB_etext\fR, the
58 address of _end is same as the address of \fB_edata\fR.
59 .sp
60 If the address of \fB_etext\fR is greater than the address of \fB_edata\fR, the
61 address of \fB_end\fR is set to the page boundary after the address pointed to
62 by \fB_etext\fR.
63 .RE
65 .SH USAGE
66 .sp
67 .LP
68 When execution begins, the program break (the first location beyond the data)
69 coincides with \fB_end\fR, but the program break can be reset by the
70 \fBbrk\fR(2), \fBmalloc\fR(3C), and the standard input/output library (see
71 \fBstdio\fR(3C)), functions by the profile (\fB-p\fR) option of  \fBcc\fR, and
72 so on. Thus, the current value of the program break should be determined by
73 \fBsbrk ((char *)0)\fR.
74 .sp
75 .LP
76 References to \fBend\fR, \fBetext\fR, and \fBedata\fR, without a preceding
77 underscore will be aliased to the associated symbol that begins with the
78 underscore.
79 .SH SEE ALSO
80 .sp
81 .LP
82 \fBbrk\fR(2), \fBmalloc\fR(3C), \fBstdio\fR(3C)