If the current implementation of GrowableArray cannot grow, it will
call vm_exit_out_of_memory(). Implement a subclass of GrowableArray
that returns a fail if the GrowableArray cannot grow so that
the caller can handle the failure.
The class GrowableArray is used to allocate space from the C heap. If
needed the space can be expanded when the original allocation is full. If
an attempt to expand the GrowableArray fails, the current implementation
call vm_exit_out_of_memory() and the VM exits. There are some situations
where the VM could recover from a failure to expand without exiting. In
order to more gracefully handle an expansion failure, the caller of
the assignment to a GrowableArray (the push method for GrowableArray) needs
to be returned a value indicating a failure (as opposed to having push()
exit). Find an example of the use of GrowableArray which could gracefully
recover from an expansion failure to verify that this is a useful RFE. See
the evaluation section for 1 possibility.
call vm_exit_out_of_memory(). Implement a subclass of GrowableArray
that returns a fail if the GrowableArray cannot grow so that
the caller can handle the failure.
The class GrowableArray is used to allocate space from the C heap. If
needed the space can be expanded when the original allocation is full. If
an attempt to expand the GrowableArray fails, the current implementation
call vm_exit_out_of_memory() and the VM exits. There are some situations
where the VM could recover from a failure to expand without exiting. In
order to more gracefully handle an expansion failure, the caller of
the assignment to a GrowableArray (the push method for GrowableArray) needs
to be returned a value indicating a failure (as opposed to having push()
exit). Find an example of the use of GrowableArray which could gracefully
recover from an expansion failure to verify that this is a useful RFE. See
the evaluation section for 1 possibility.