END(3C)
NAME
end, etext, edata − last locations in program
SYNOPSIS
extern char end;
extern char etext;
extern char edata;
HP-UX COMPATIBILITY
Level: HP-UX/RUN ONLY
Origin: System V
DESCRIPTION
These names refer neither to routines nor to locations with interesting contents. The address of etext is the first address above the program text, edata above the initialized data region, and end above the uninitialized data region. Note that the definition of each of these is implementation-dependent. See HARDWARE DEPENDENCIES below.
When execution begins, the program break (the first location beyond the data) coincides with end, but the program break may be reset by the routines of brk(2), malloc(3C), standard input/output (stdio(3S)), the profile (−p) option of cc(1), and so on. Thus, the current value of the program break should be determined by sbrk(0) (see brk(2)).
HARDWARE DEPENDENCIES
Series 500:
End is the lowest heap address available to the user. Etext and Edata are not supported.
Memallc(2) is more efficient than malloc(3C) for setting the program break.
SEE ALSO
cc(1), brk(2), malloc(3C), stdio(3S).
Hewlett-Packard — last mod. May 11, 2021