From: Ted Kremenek Date: Mon, 18 Apr 2011 22:47:07 +0000 (+0000) Subject: Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61e0b94838127601718c64b80940868d4b995e1f;p=clang Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump allocated for declarations, statements, and types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129729 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 63d6d0096b..820c5a288d 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -342,6 +342,12 @@ public: } 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; }