C++ new/delete replacement that is thread safe and fast?
> bobp@troi.erols.com (Bob Pearson) writes: > > > Our platform is Solaris 2.5.1 and I am looking for a commerical, freeware > > or shareware C++ new/delete replacement that is thread safe and uses more > > than a single mutex. We have a multi-threaded application that is using a > > tremendous amount of new operators and is huge (>200MB) and is constantly > > running into very high mutex contention due to the single mutex for new in > > libC.a from: > > > > SUNWSpro “CC: SC4.0 18 Oct 1995 C++ 4.1”. > > You might want to check out ptmalloc: > > ftp://ftp.dent.med.uni-muenchen.de/pub/wmglo/ptmalloc.tar.gz > > I would hope that operator new somehow invokes malloc at a lower > level. If not, you would have to write a small wrapper — there > should be one coming with gcc that you could use. > > Hope this helps, > Wolfram.