[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

_end, _etext, or _edata Identifier

Purpose

Define the first addresses following the program, initialized data, and all data.

Syntax

extern _end;

extern _etext;

extern _edata;

Description

The external names _end, _etext, and _edata are defined by the loader for all programs. They are not subroutines but identifiers associated with the following addresses:

_etext The first address following the program text.
_edata The first address following the initialized data region.
_end The first address following the data region that is not initialized. The name end (with no underscore) defines the same address as does _end (with underscore).

The break value of the program is the first location beyond the data. When a program begins running, this location coincides with end. However, many factors can change the break value, including:

Therefore, use the brk or sbrk(0) subroutine, not the end address, to determine the break value of the program.

Related Information

The brk or sbrk (brk or sbrk Subroutine) subroutine, malloc (malloc, free, realloc, calloc, mallopt, mallinfo, mallinfo_heap, alloca, or valloc Subroutine) subroutine.

Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]