Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ end(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

brk, sbrk

malloc, free, realloc, calloc, valloc, alloca, mallopt, mallinfo

stdio

cc



END(3,L)                    AIX Technical Reference                    END(3,L)



-------------------------------------------------------------------------------
end, etext, edata



PURPOSE

Defines the last location of a program.

LIBRARY

None

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 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:

  o The brk system call
  o The malloc subroutine
  o The standard input/output subroutines
  o The -p flag on the cc command.

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

RELATED INFORMATION

In this book:  "brk, sbrk," "malloc, free, realloc, calloc, valloc, alloca,
mallopt, mallinfo," and  "stdio."

The cc command in AIX Operating System Commands Reference.









Processed November 7, 1990         END(3,L)                                   1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026