summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Allocator.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-07 22:58:06 +0000
committerDan Gohman <gohman@apple.com>2008-07-07 22:58:06 +0000
commite5932e5a3d410f0d52b834c3cd8ba55f75be3262 (patch)
tree96d3735eb6acdb3ad12cd04948429b391f08502a /llvm/lib/Support/Allocator.cpp
parent0189604b0ab456d006b14da4d52213c6d442c147 (diff)
downloadbcm5719-llvm-e5932e5a3d410f0d52b834c3cd8ba55f75be3262.tar.gz
bcm5719-llvm-e5932e5a3d410f0d52b834c3cd8ba55f75be3262.zip
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. llvm-svn: 53210
Diffstat (limited to 'llvm/lib/Support/Allocator.cpp')
-rw-r--r--llvm/lib/Support/Allocator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp
index ba6a393c81f..584ca125b73 100644
--- a/llvm/lib/Support/Allocator.cpp
+++ b/llvm/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 <ostream>
@@ -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';
+}
OpenPOWER on IntegriCloud