projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add another sandybridge alias.
[oota-llvm.git]
/
lib
/
Support
/
Allocator.cpp
diff --git
a/lib/Support/Allocator.cpp
b/lib/Support/Allocator.cpp
index 5e27df6628ebbb2524d70eb4f02b3d366fede742..215b0f249d96f82cda56763998be5326fae3569e 100644
(file)
--- a/
lib/Support/Allocator.cpp
+++ b/
lib/Support/Allocator.cpp
@@
-136,6
+136,14
@@
unsigned BumpPtrAllocator::GetNumSlabs() const {
return NumSlabs;
}
return NumSlabs;
}
+size_t BumpPtrAllocator::getTotalMemory() const {
+ size_t TotalMemory = 0;
+ for (MemSlab *Slab = CurSlab; Slab != 0; Slab = Slab->NextPtr) {
+ TotalMemory += Slab->Size;
+ }
+ return TotalMemory;
+}
+
void BumpPtrAllocator::PrintStats() const {
unsigned NumSlabs = 0;
size_t TotalMemory = 0;
void BumpPtrAllocator::PrintStats() const {
unsigned NumSlabs = 0;
size_t TotalMemory = 0;