You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are great C-compatible interfaces in heap-profiler.h and
profiler.h. But why are there only C++ interface in malloc_hook.h and
malloc_extension.h ?
Reported by lxu4net on 2008-06-24 12:29:39
The text was updated successfully, but these errors were encountered:
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.
Originally reported on Google Code with ID 63
Reported by
lxu4net
on 2008-06-24 12:29:39The text was updated successfully, but these errors were encountered: