unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



end(5)								       end(5)



NAME

  end, etext, edata - Defines the last location	of a program

SYNOPSIS

  extern end;
  extern etext;
  extern edata;



DESCRIPTION

  The external names end, etext, and edata are defined for all programs.
  They are not functions, 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:

    +  The brk() function

    +  The malloc() function

    +  The standard I/O	functions

    +  The -p flag on the cc command

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

SEE ALSO

  Functions: brk(2), malloc(3)

  Commands: cc(1)