[cfe-commits] r129729 - /cfe/trunk/include/clang/AST/ASTContext.h
Ted Kremenek
kremenek at apple.com
Mon Apr 18 15:47:07 PDT 2011
Author: kremenek
Date: Mon Apr 18 17:47:07 2011
New Revision: 129729
URL: http://llvm.org/viewvc/llvm-project?rev=129729&view=rev
Log:
Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump allocated for declarations, statements, and types.
Modified:
cfe/trunk/include/clang/AST/ASTContext.h
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=129729&r1=129728&r2=129729&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Mon Apr 18 17:47:07 2011
@@ -342,6 +342,12 @@
}
void Deallocate(void *Ptr) const { }
+ /// Return the total amount of physical memory allocated for representing
+ /// AST nodes and type information.
+ size_t getTotalAllocatedMemory() const {
+ return BumpAlloc.getTotalMemory();
+ }
+
PartialDiagnostic::StorageAllocator &getDiagAllocator() {
return DiagAllocator;
}
More information about the cfe-commits
mailing list