From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,345a8b767542016e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-20 07:09:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!news-out.cwix.com!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc03.gnilink.net.POSTED!53ab2750!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: <3c90af1e@news.starhub.net.sg> <3c91bfa3.1987537@news.demon.co.uk> <3C921A81.9060708@mail.com> <3C962624.5080008@home.com> <3c97027d.1284426@news.demon.co.uk> <3C97713C.1040805@home.com> <3C97CD1F.A675D84F@raytheon.com> Subject: Re: memory leakages with Ada? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 20 Mar 2002 15:09:12 GMT NNTP-Posting-Host: 141.154.14.20 X-Complaints-To: business-support@verizon.com X-Trace: nwrddc03.gnilink.net 1016636952 141.154.14.20 (Wed, 20 Mar 2002 10:09:12 EST) NNTP-Posting-Date: Wed, 20 Mar 2002 10:09:12 EST Xref: archiver1.google.com comp.lang.ada:21489 Date: 2002-03-20T15:09:12+00:00 List-Id: "Mark Johnson" wrote in message news:3C97CD1F.A675D84F@raytheon.com... > A little history. I have an old copy of K&R (Chapter 8, p 177) and the > implementation in that book for alloc/free will blow up if you provide a > NULL pointer to free. It is coded something like the following... I probably should have been clearer. ANSI C requires that free(NULL) should have no effect. Pre-ANSI compilers may very well have not followed this rule. The whole ANSI C effort has been hobbled by the fact that there was so much C code out there that depended on existing compiler quirks. The standard ended up being fairly toothless, especially in the requirements of the standard library functions.