SmartHeap
My company makes a 3D file format translation program for Win32s using Visual C
32-bit. Some of our translators had big troubles when ported to Win32s. They
were doing several thousand small malloc()s and realloc()s and after only about
20K of total allocations, malloc() would fail after growing slower and slower,
per-call. Of course, VC's heap manager was to blame – there was plenty of
memory in the system.
The people at MicroQuill must've had my number. I received their white paper
on "SmartHeap" replacement heap manager and seemingly every week or two I'd get
another card reminding me of the product's features.
The product isn't cheap. It irked me to spend $700 to fix the heap manager in
a $200 compiler. Their manual proudly proclaims that the library is portable
across platforms, but their pricing scheme is different per-platform. It looks
like you get the same manual no matter which platform, since half the manual is
docs for platforms you didn't buy. They sell the source code – again, it's a
different price per-platform, although it's not clear to me what might differ
in the source code, and the price is $1000 for Win32s.
Their license agreement seems unusual, too. They ask that each programmer on
the project buy a copy of the library, regardless if you're only producing one
product with it. I can't remember another link library product with a license
like that. MicroQuill must be making money hand over fist.
I must say that the product works, and works well. No more than five minutes
after installation, it had fixed the supposed out-of-memory conditions in our
product. (You just add it to the link line.) It does apparently deliver the
orders-of-magnitude improvements promised in their literature. This is an
entirely unsolicited testimonial. 🙂 I don't begrudge them having the right
product at the right time at a market-will-bear, milk-every-angle price, but it
irks me that Microsoft's heap manager is so bad.
In fact, I wish we didn't have to use SmartHeap. I'd like to avoid spending
another several thousand dollars to license their heap manager for all the
platforms we implement: the Mac, SGI, 3D Studio's PharLap, etc. I doubt we
need an industrial-strength heap manager, we just need one that's better than
the ones in Microsoft Visual C 32-bit and Metaware High C / PharLap. Can
someone point me to public domain source code for a fast replacement for
malloc() and free()?