Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > E

end(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

end, edata, etext, __data_start, __text_start — last locations in program

SYNOPSIS

extern void *_end, *end, *_etext, *etext, *_edata, *edata, *__data_start, *__text_start;

DESCRIPTION

These names refer neither to routines nor to locations with interesting contents. The address of the symbols _etext and etext is the first address above the program text. The address of _edata and edata is the first address above the initialized data region. The address of _end and end is the first address above the uninitialized data region.

The address of the symbol __data_start is the beginning address of the program's data area, and __text_start is the beginning address of the program's text area.

The linker defines these symbols with the appropriate values if they are referenced by the program but not defined. The linker issues an error if the user attempts to define _edata, _etext, _end, __data_start, or __text_start.

When execution begins, the program break (the first location beyond the data) coincides with _end, but the program break can 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)).

WARNINGS

In C, these names must look like addresses. Thus, use &end instead of end to access the current value of end.

SEE ALSO

System Tools

cc(1)

Invoke the HP-UX C compiler

ld(1)

Invoke the link editor

Miscellaneous

brk(2)

Change data segment space allocation

crt0(3)

Execution startup routine

malloc(3C)

Main memory allocator

stdio(3S)

Standard buffered input/output stream file package

STANDARDS CONFORMANCE

end(): XPG2

edata(): XPG2

etext(): XPG2

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.