SEGMENT_RESIZE
Purpose
segment_resize resizes
a memory segment.
Synopsis
#include <types.h>
#include <stub.h>
int segment_resize(Capability
*segment, int offset);
Parameters
-
segment: the capability for the
segment to be resized;
-
offset: the number of bytes to
extend or shrink the segment.
Description
segment_resize resizes the memory segment
designated by segment by offset bytes. If offset is
less than 0, then the segment is shrunk and memory is released. If offset
is grater than 0, then the segment is extended and memory is allocated.
Return Values
On success, segment_resize returns
0.
On fail, segment_resize returns a negative
value indicating one of the following errors:
See Also
segment_create,
segment_destroy, segment_status,
segment_attach, segment_detach
Notes
The current version restricts the maximum
size for segments to 4 Mbytes.