1end(3C)                  Standard C Library Functions                  end(3C)
2
3
4

NAME

6       end, _end, etext, _etext, edata, _edata - last locations in program
7

SYNOPSIS

9       extern int _etext;
10
11
12       extern int _edata;
13
14
15       extern int _end;
16
17

DESCRIPTION

19       These names refer neither to routines nor to locations with interesting
20       contents; only their addresses are meaningful.
21
22       _etext    The address of _etext is the first location  after  the  last
23                 read-only loadable segment.
24
25
26       _edata    The  address  of  _edata is the first location after the last
27                 read-write loadable segment.
28
29
30       _end      If the address of _edata  is  greater  than  the  address  of
31                 _etext, the address of _end is same as the address of _edata.
32
33                 If  the  address  of  _etext  is  greater than the address of
34                 _edata, the address of _end is set to the page boundary after
35                 the address pointed to by _etext.
36
37

USAGE

39       When execution begins, the program break (the first location beyond the
40       data) coincides with _end, but the program break can be  reset  by  the
41       brk(2),   malloc(3C),   and  the  standard  input/output  library  (see
42       stdio(3C)), functions by the profile (-p) option of   cc,  and  so  on.
43       Thus,  the  current  value of the program break should be determined by
44       sbrk ((char *)0).
45
46
47       References to end, etext, and edata,  without  a  preceding  underscore
48       will  be  aliased  to the associated symbol that begins with the under‐
49       score.
50

SEE ALSO

52       brk(2), malloc(3C), stdio(3C)
53
54
55
56SunOS 5.11                        31 Mar 2006                          end(3C)
Impressum