From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: free() question Date: Fri, 10 Jan 1997 18:34:09 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 34 Message-ID: <32D6FC21.70C8@cs.com> References: <199701081113 DOT MAA01144 AT gilberto DOT physik DOT rwth-aachen DOT de> <32D4155A DOT 51F4 AT exis DOT net> <32D6811F DOT 9B1 AT ibm DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp101.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Joseph Donahue wrote: > > I must agree with you (Joe) about good habits. But did you intend to > give the impression the program should terminate? > > If malloc() fails on a modern multitasking operating system, there is > still the chance that giving the user the oportunity to close some files > or stop some other non-essential programs will free enough memory for > the program to continue without reloading/reinitializing. IMHO there is no way to count on this being the case in any system. DOS, for example. But 99% of the time, if malloc() fails, your program cannot effectively continue and will have to be terminated. Of course, depending on how interactive/user friendly the program is, it can get more or less detailed in its error messages. :) > Ah...while I'm here...could someone please tell me what djgpp is? I > assume this is some C/C++ compiler? Umm.. yeah. :) In fact, DJGPP is a complete 32-bit protected mode port of GNU C/C++/Pascal and assorted utilities to MS-DOS. It is perhaps the single best MS-DOS compiler in existence, producing code that is faster, cleaner, and smaller than Borland's 32-bit compiler. For example, id Software's hit game Quake was written and compiled using DJGPP! For more info, visit http://www.delorie.com/djgpp/, and browse around. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Call me for your free AOL disk! | http://www.cs.com/fighteer | | Chain letters, work-at-home schemes, free long distance, etc., | | are ILLEGAL! Keep the Internet litter-free... don't SPAM. | ---------------------------------------------------------------------