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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc05aeb5e0d8b475 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-14 05:51:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: Free-ing memory: not springing leaks? References: <2TM8b.1013$Nb6.297@newsfep4-winn.server.ntli.net> <9JY8b.1963$WI3.25442@newsfep4-glfd.server.ntli.net> From: Matthew Heaney Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 14 Sep 2003 12:51:55 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1063543915 65.110.133.134 (Sun, 14 Sep 2003 08:51:55 EDT) NNTP-Posting-Date: Sun, 14 Sep 2003 08:51:55 EDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:42476 Date: 2003-09-14T12:51:55+00:00 List-Id: chris writes: > What if there is no call to free memory? Then your binding is missing at least one operation. > For example, the library loader for linux error mechanism is to return > an error msg describing the problem. Once you have it appears to be > your problem what you do with it. There is no call present in the > library to return the memory. This is an Ada binding? Who wrote it? > Should I bind to a C compiled function to do this? Perhaps in the > case of linux, to the free function in the std lib? I guess you are > left to free it yourself in C because it provides "free" and it is > natural to use it in C. If you know it was malloc'd, then yes, just write a binding to free and call that.