This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Use of malloc() in v3
- From: "Stephen M. Webb" <stephen dot webb at bregmasoft dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Tue, 11 Nov 2003 11:39:46 -0500
- Subject: Use of malloc() in v3
- Reply-to: stephen dot webb at bregmasoft dot com
I've been stumbling across several places in libstdc++ where malloc() is used
instead of ::operator new(). Since I'm working on a platform that doesn't
supply malloc(), this inconveniences me.
Is there any reason for choosing malloc() over of ::operator new()? I can
think of reasons to use ::operator new() over malloc() (namely, a single
point of replacement for instrumentation or performance tweaking, and of
course the unusual case of not having a malloc implementation).
I do have some patches locally that would change this.
--
Stephen M. Webb
stephen.webb@bregmasoft.com