Date: Sun, 26 May 1996 08:54:01 +0200 (IST) From: Eli Zaretskii To: Malcolm Taylor Cc: djgpp AT delorie DOT com Subject: Re: Trapping failed malloc calls In-Reply-To: <4o40cb$khi@news.manawatu.gen.nz> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 24 May 1996, Malcolm Taylor wrote: > I am wondering if there is an easy way of trapping failed malloc and > new calls within a program. At present the program will just exit with If you need to debug memory allocation, check out the debugging malloc package. It is available for free on the 'net. Check the DJGPP mail archives for pointers, there was a thread about it a year or so ago. > Also if anyone has any better malloc for wide ranging sizes than the > standard malloc I would be interested. One particular program I've > written mallocs blocks that are from between 100b and 4Mb in size > (approx) and the normal malloc seems to use more memory than it needs. > If you know of one then please e-mail me about it. Might as well try GNU malloc, unless LGPL is a problem.