brk()                    Change Data-Segment Space Allocation
 
 #include   <alloc.h>
 
 int        brk(endds);
 void       *endds;                      New ending address
 
    brk() dynamically changes the amount of space allocated to the
    calling program's data segment.  It does this by resetting the
    program's 'break value', which is the address of the first location
    beyond the end of the data segment.  brk() sets the 'break value' to
    'endds'.  The amount of allocated space increases as the break value
    increases.
 
    Returns:    If successful, 0 is returned.  On failure, -1 is returned
                and 'errno' (defined in <stdlib.h>) is set to ENOMEM, not
                enough core.
 
      Notes:    brk() will fail without making any changes is such a
                change would result in more space being allocated than is
                allowable.

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster