From e14d81deeb6bb3404ffee5e59ecb88304f112f4a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 7 Jul 2008 22:58:06 +0000 Subject: Add some basic Pool-allocation infrastructure. This adds a Recycler class, for handling bookkeeping for deleted objects, as well as the alist class template, for keeping lists of objects allocated from Recyclers, and some related utilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53210 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Allocator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Support') diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index ba6a393c81..584ca125b7 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/Allocator.h" +#include "llvm/Support/Recycler.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/Streams.h" #include @@ -130,3 +131,9 @@ void BumpPtrAllocator::PrintStats() const { cerr << "\nNumber of memory regions: " << NumRegions << "\n"; cerr << "Bytes allocated: " << BytesUsed << "\n"; } + +void llvm::PrintRecyclerStats(size_t LargestTypeSize, + size_t FreeListSize) { + cerr << "Recycler element size: " << LargestTypeSize << '\n'; + cerr << "Number of elements free for recycling: " << FreeListSize << '\n'; +} -- cgit v1.2.3