X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Newsgroups: comp.os.msdos.djgpp Date: Thu, 8 Nov 2012 23:19:59 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=216.113.168.130; posting-account=eAPBEQoAAABmdAnwbvZ6PeDp9BnSizbB NNTP-Posting-Host: 216.113.168.130 References: <385767A2 DOT 18A4FAAD AT earthlink DOT net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8e5b70dc-67e5-43dd-8787-cf1305b573b4@googlegroups.com> Subject: Re: is 'ld --wrap' not for C++? From: narensingh AT gmail DOT com Cc: Martin Ambuhl , djgpp AT delorie DOT com Injection-Date: Fri, 09 Nov 2012 07:19:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 Bytes: 2107 Lines: 19 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 On Wednesday, December 15, 1999 1:00:00 AM UTC-7, Eli Zaretskii wrote: > On Wed, 15 Dec 1999, Martin Ambuhl wrote: > > > Alexey Zakhlestine wrote: > > > > > > Well.... astually AFAIK "free" and "malloc" are C-routines.... not C++ > > > > > > In C++ you should use new/delete > > > > It may be preferable in most cases to use new and delete in C++, that > > first line has an extremely foul taste. > > I don't think this is an issue in this case. malloc should not be used > in C++ application code, but I'm guesing that new and delete call malloc > and free internally. What the user who started this thread was trying to > do is to wrap malloc and free with user-defined wrappers, to be able to > watch memory allocation, presumably for debugging. Thus, the reference > to malloc and free in this case is justified. name mangling might be the issue