X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Mok-Kong Shen Newsgroups: comp.os.msdos.djgpp Subject: Re: Different memory allocations were to the same location Date: Sat, 04 Jun 2011 15:53:56 +0200 Organization: albasani.net Lines: 13 Message-ID: References: <83y61hd7xj DOT fsf AT gnu DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net hIGn99dT+c5tZG4bUC/pQr5OnPF2uBu4dyI9q8HSm3pZDtCL7YfGstf5XzXhPE/WDQ6ZtAUDrt9W2q6wdbvt8g== NNTP-Posting-Date: Sat, 4 Jun 2011 13:53:44 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="RM+khdiYgT+JKSaU7uA019vF6Ts/+658HyAUS0OORLwexNe/ZRIHh7hgBwSXirQBb3rM+3VselB7PGe5uPvJKHinu+q5Ouku4ZoK+7JC27qXE/KIcT1EBM5pNZY+VNFp"; mail-complaints-to="abuse AT albasani DOT net" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <83y61hd7xj.fsf@gnu.org> Cancel-Lock: sha1:6SsrJTijUuCYOEQURv0f8FGpSA0= Bytes: 1681 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Am 04.06.2011 15:48, schrieb Eli Zaretskii: > In generateintvec, you free the memory allocated by the previous call, > so the same address is now available for reuse. Therefore calloc > happily reuses it. > > Why is that a problem? But it should free the memory of that varialbe reprensented by the formal parameter at the time of function call, shouldn't it? (In the two calls uh was associated to different actual parameters.) M. K. Shen