rtems_status_code rtems_region_resize_segment( rtems_id id, void *segment, size_t size, size_t *old_size );
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
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.
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.
Copyright © 1988-2008 OAR Corporation