Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: Returning from XtMalloc?? Message-ID: <2935@bacchus.dec.com> Date: 1 Mar 90 18:46:56 GMT References: <9002271554.AA12993@ra.> Organization: DEC Western Software Lab Lines: 14 In article <9002271554.AA12993@ra.> devsop%ra%netvax@CCC.NMFECC.GOV (Pothier Steve) writes: >However, the Xt versions don't seem to return if space can't be >allocated. Does this mean one should use the Xt alloc functions only >when the memory they grab is strictly necessary to continue with >client execution? Should we use regular C alloc functions when there >is the possibility of continueing from a failed alloc? Yes. However, most applications react to a failed malloc (if they bother to react to it at all) by issuing an error message, so XtMalloc does this automatically as a convenience to the programmer. If you can recover from a failed malloc, by all means use malloc. -paul asente asente@decwrl.dec.com decwrl!asente