Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ end(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

brk, sbrk

malloc, free, realloc, calloc

standard i/o library

cc

     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," and  "standard i/o library."

     The  cc   command  in   AIX  Operating   System  Commands
     Reference.

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