On Mon, Apr 18, 2011 at 6:47 PM, Ted Kremenek <[email protected]> wrote: > Author: kremenek > Date: Mon Apr 18 17:47:10 2011 > New Revision: 129730 > > URL: http://llvm.org/viewvc/llvm-project?rev=129730&view=rev > Log: > Add libclang API to query how much memory is used by a CXTranslationUnit. > This is a WIP. Currently we report > the amount used for expressions, types, identifiers, and selectors. > > Modified: > cfe/trunk/include/clang-c/Index.h > cfe/trunk/tools/c-index-test/c-index-test.c > +void PrintMemoryUsage(CXTranslationUnit TU) { > + CXTUMemoryUsage usage = clang_getCXTUMemoryUsage(TU); > + fprintf(stderr, "Memory usage:\n"); > + unsigned long total = 0.0; > + for (unsigned i = 0, n = usage.numEntries; i != n; ++i) {
See r129732. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
