


      BBBBRRRRKKKK((((2222))))                      ((((UUUUNNNNIIIIXXXX 5555....0000))))                     BBBBRRRRKKKK((((2222))))



      NNNNAAAAMMMMEEEE
           brk, sbrk - change data segment space allocation

      SSSSYYYYNNNNTTTTAAAAXXXX
           iiiinnnntttt bbbbrrrrkkkk ((((eeeennnnddddddddssss))))
           cccchhhhaaaarrrr ****eeeennnnddddddddssss;;;;

           cccchhhhaaaarrrr ****ssssbbbbrrrrkkkk ((((iiiinnnnccccrrrr))))
           iiiinnnntttt iiiinnnnccccrrrr;;;;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _B_r_k and _s_b_r_k are used to change dynamically the amount of
           space allocated for the calling process's data segment; see
           _e_x_e_c(2).  The change is made by resetting the process's
           break value and allocating the appropriate amount of space.
           The break value is the address of the first location beyond
           the end of the data segment.  The amount of allocated space
           increases as the break value increases.  The newly allocated
           space is set to zero.

           _B_r_k sets the break value to _e_n_d_d_s and changes the allocated
           space accordingly.

           _S_b_r_k adds _i_n_c_r bytes to the break value and changes the
           allocated space accordingly.  _I_n_c_r can be negative, in which
           case the amount of allocated space is decreased.

           _B_r_k and _s_b_r_k will fail without making any change in the
           allocated space if one or more of the following are true:

                Such a change would result in more space being
                allocated than is allowed by a system-imposed maximum.
                [ENOMEM]

                Such a change would result in the break value being
                greater than or equal to the start address of any
                attached shared memory segment.

      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
           Upon successful completion, _b_r_k returns a value of 0 and
           _s_b_r_k returns the old break value.  Otherwise, a value of -1
           is returned and _e_r_r_n_o is set to indicate the error.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           exec(2).










      Page 1                                                   (9010-E)



