end(3c) DG/UX 4.30 end(3c)
NAME
end, etext, edata - last locations in program
SYNOPSIS
extern end;
extern etext;
extern edata;
DESCRIPTION
These names refer to memory locations that demarcate a
program:
etext, etext
The first address above the program text.
edata, edata
The first address above the initialized data
region.
end, end
The first address above the uninitialized data
region.
In addition these names are also provided:
.text.start
The first address of program text.
.text.end
The first address above the program text.
.data.start
The first address of the initialized data region.
.data.end
The first address above the initialized data
region.
.bss.start
The first address of the uninitialized data
region.
.bss.end
The first address above the uninitialized data
region.
When execution begins, the program break (the first location
beyond the data) coincides with end, but you can reset it
with brk(2), malloc(3C), stdio(3S) (standard input/output),
the profile (-p) option of cc(1), and so on. Thus, you can
find out the current value of the program break by calling
the sbrk(2) system call with a value of 0. (see sbrk(2)).
Licensed material--property of copyright holder(s) Page 1
end(3c) DG/UX 4.30 end(3c)
SEE ALSO
brk(2), sbrk(2), malloc(3C), stdio(3S).
cc(1) in the Programmer's Reference for the DG/UX System
Licensed material--property of copyright holder(s) Page 2