From: j DOT aldrich6 AT genie DOT com Message-Id: <199608030423.AA020406222@relay1.geis.com> Date: Sat, 3 Aug 96 04:09:00 UTC 0000 To: conradsong AT mail DOT utexas DOT edu Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Subject: Re: Malloc and realloc pains.. Reply to message 2941876 from CONRADSONG AT MA on 07/28/96 10:26PM >Just so everyone's aware. There are quirks in which different libraries >treat malloc and realloc routines. Oh no. Quirks in individual compilers' libraries? Do tell! ;) >Borland returns a NULL pointer on a malloc( (size_t)(0) ); >Microsoft does not deallocate the passed memory block on a failed realloc. > >Perhaps someone can come up with a way to neatly fix the problem? Well, I suppose you could somehow obtain the source code for these compilers, debug it, and submit patched versions to the respective companies. Of course, there's no way they'd release the source code, so that's out. You could disassemble their library object code, fix it, and submit patches, but then they'd sue you for breach of license, copyright, and everything else. You could spend years becoming a programmer for these companies and work your way up to the point where you'd be in charge of the newest revisions of their products, and use your influence to get the problem fixed. Of course, you'd probably be told it isn't cost-effective or necessary, and you wouldn't get approval. Not to mention that this would only work with one company; trying to switch to another to do the same thing would probably get you indicted for corporate espionage or something. Or you could convince every programmer in the world to switch to DJGPP, which actually encourages you to find and fix bugs and submit additional material. Well, we can dream... :( John