Closed GoogleCodeExporter closed 9 years ago
It's a fair question. The C-compatible interfaces were added to
heap-profiler.h and
profiler.h more or less at the last minute, when we realized it was easy to do
so.
Originally, we had developed tcmalloc as a c++-only application. You still see
the
legacy of that in malloc_hook and malloc_extension, which were designed to use
the
capabilities of C++, and weren't easy to make a "C" interface for like the cpu
profiler and heap profiler (with their much simpler APIs).
With a recent refactoring of the malloc_hook code, it's actually pretty easy to
make
that "C"-accessible; I'll see if I can do that for the next release.
malloc_extension.h is much more difficult -- it uses virtual inheritence to
support
multiple memory allocators. But I may be able to do something there as well;
I'll
discuss that with some of the other folks here.
Original comment by csilv...@gmail.com
on 25 Jun 2008 at 12:10
This was added in perftools 0.99, just released.
Original comment by csilv...@gmail.com
on 19 Sep 2008 at 8:09
Original issue reported on code.google.com by
lxu4...@gmail.com
on 24 Jun 2008 at 12:29