Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!samsung!think.com!paperboy!macrakis From: macrakis@gr.osf.org (Stavros Macrakis) Newsgroups: comp.lang.modula3 Subject: Re: running out of memory Message-ID: Date: 13 Feb 91 08:38:00 GMT References: <9102120059.AA15796@jumbo.pa.dec.com> Sender: news@OSF.ORG Organization: OSF Research Institute--Grenoble Lines: 29 In-reply-to: gnelson's message of 12 Feb 91 00:58:51 GMT In article <9102120059.AA15796@jumbo.pa.dec.com> gnelson (Greg Nelson) writes: Doug Moen proposes that Modula-3 define an exception to be raised by NEW when storage is exhausted.... Of course, as Dave Emery points out, [the exception handler] has to be coded very carefully.... [Discussion of multithreading problems...] The solution to these problems is to provide an interface through which clients can register procedures to be executed when a program aborts due to a checked runtime error.... There are many cases where running out of memory is not a fatal error which should give rise only to cleanup activities. In particular, in interactive systems, the execution of a given command may exhaust memory, and thus have to be aborted, although the overall interactive environment should recover gracefully. An even simpler case: some network protocols include requests to allocate buffers of given size. If the buffer allocation fails, you should send a NACK to the requester, not die. -s Stavros Macrakis Open Software Foundation Research Institute Mail: 2 av de Vignate, 38610 Gieres (Grenoble), France Net: macrakis@gr.osf.org Phone: +33/76.63.48.82 Fax: +33/76.51.05.32