- NetBSD Manual Pages
END(3) NetBSD Library Functions Manual END(3)
Powered by man-cgi (2020-09-24).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
end, etext, edata -- end boundaries of image segments
extern int end;
extern int etext;
extern int edata;
The globals end, etext and edata are program segment end addresses.
etext is located at the first address after the end of the text segment.
edata is located at the first address after the end of the initialized
end is located at the first address after the end of the data segment
(BSS) when the program is loaded. Use the sbrk(2) system call with zero
as its argument to find the current end of the data segment.
sbrk(2), malloc(3), a.out(5)
An end manual page appeared in Version 6 AT&T UNIX.
Traditionally, no variable existed that pointed to the start of the text
segment because the text segment always started at address zero.
Although it is no longer valid to make this assumption, no variable simi-
lar to the ones documented above exists to point to the start of the text
NetBSD 9.0 September 1, 2005 NetBSD 9.0