RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


Region Manager REGION_RESIZE_SEGMENT - Change size of a segment

PREV UP NEXT Bookshelf RTEMS C User's Guide

14.4.8: REGION_RESIZE_SEGMENT - Change size of a segment

CALLING SEQUENCE:

rtems_status_code rtems_region_resize_segment(
  rtems_id     id,
  void        *segment,
  size_t       size,
  size_t      *old_size
);

DIRECTIVE STATUS CODES:

RTEMS_SUCCESSFUL - segment obtained successfully
RTEMS_INVALID_ADDRESS - segment is NULL
RTEMS_INVALID_ADDRESS - old_size is NULL
RTEMS_INVALID_ID - invalid region id
RTEMS_INVALID_ADDRESS - segment address not in region RTEMS_UNSATISFIED - unable to make segment larger

DESCRIPTION:

This directive is used to increase or decrease the size of a segment. When increasing the size of a segment, it is possible that there is not memory available contiguous to the segment. In this case, the request is unsatisfied.

NOTES:

If an attempt to increase the size of a segment fails, then the application may want to allocate a new segment of the desired size, copy the contents of the original segment to the new, larger segment and then return the original segment.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2004 OAR Corporation