www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/05/13:07:59

Date: Mon, 5 Aug 1996 15:57:42 -0300
Message-Id: <1.5.4.16.19960805131633.373f9b1e@dmeasc.rc.ipt.br>
Mime-Version: 1.0
To: j DOT aldrich6 AT genie DOT com, conradsong AT mail DOT utexas DOT edu
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: Malloc and realloc pains..
Cc: djgpp AT delorie DOT com

At 04:09 03/08/96, j DOT aldrich6 AT genie DOT com wrote:
>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.

More or less! Some companies issue and make reasonably available to the
public (lately mostly through COMPUSERVE and Internet) the sources for the
libraries of theirs.
They normally will not issue sources for the compiling tools themselves nor
some specific libraries (graphics and FP emulation); but malloc will there!


>
>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
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-35221Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019