END(3C) UNIX Programmer's Manual END(3C) NAME end, etext, edata - last locations in program SYNOPSIS extern char end; extern char etext; extern char edata; HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION These names refer neither to routines nor to locations with interesting contents. The address of _e_t_e_x_t is the first address above the program text, _e_d_a_t_a above the initialized data region, and _e_n_d above the uninitialized data region. Note that the definition of each of these is implementation-dependent. See _H_A_R_D_W_A_R_E _D_E_P_E_N_D_E_N_C_I_E_S below. When execution begins, the program break coincides with _e_n_d, but the program break may be reset by the routines of _b_r_k(2), _m_a_l_l_o_c(3C), standard input/output (_s_t_d_i_o(3S)), the profile (-p) option of _c_c(1), and so on. Thus, the current value of the program break should be determined by "sbrk(0)" (see _b_r_k(2)). These symbols are accessible from assembly language provided you prefix them with an underscore (i.e. __e_n_d, __e_t_e_x_t, __e_d_a_t_a). HARDWARE DEPENDENCIES Series 500: _E_n_d is the lowest heap address available to the user. _E_t_e_x_t is the lowest available address in the D-data segment. _E_d_a_t_a is the first available address in the I-data area. Use _m_e_m_a_l_l_c(2) instead of _m_a_l_l_o_c(3C) to set the program break. In C, these names must look like addresses. Thus, you would write &end instead of end to access the current value of _e_n_d. SEE ALSO brk(2), malloc(3C).