next up previous contents index
Next: Parameter Checking Up: Caveats Previous: Caveats

Malloc Errors

 

Errors resulting from insufficient memory space are in general not caught. In particular it is assumed that malloc works. If such errors are to be dealt with it should be done by replacing malloc calls with calls to a special routine which calls malloc. If malloc fails it should be caught within this routine and space should be made by releasing objects within the workspace (using RO_RELEASEOBJECT()). Then malloc should be called again. It is of course important not to release objects which are being used by the current user level function. 

Objects which have not been edited and are not being used by the current function should be able to be released without any observable effect from a user standpoint.



Martin Sjolin
Thu Jun 15 20:41:59 MET DST 1995