This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use of malloc() in v3


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]