DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

end(S-osr5)


end, etext, edata -- last locations in program

Syntax

extern end, _end;
extern etext, _etext;
extern edata, _edata;

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. Those symbols whose names start with a underscore (_) are equivalent to the ones without the leading underscore. The only difference is that the symbols etext, edata, and end are not defined in any one of the following strictly standard conforming APIs: ANSI (cc -a ansi), POSIX (cc -a posix), and XPG4 (cc -a xpg4).

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(S-osr5), malloc(S-osr5), standard input/output stdio(S-osr5), the profile (-p) option of cc(CP), and so on. Thus, the current value of the program break should be determined by sbrk ((char *)0). See brk(S-osr5).

See also

brk(S-osr5), cc(CP), malloc(S-osr5), stdio(S-osr5)

Standards conformance

end, _end, etext, _etext, edata, and _edata are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005