projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Insert a sanity check on the combining of x86 truncing-store nodes. This comes to...
[oota-llvm.git]
/
lib
/
Support
/
Allocator.cpp
diff --git
a/lib/Support/Allocator.cpp
b/lib/Support/Allocator.cpp
index 02b45d8af98f1be8dd80b76fb1fbd297e59e026a..215b0f249d96f82cda56763998be5326fae3569e 100644
(file)
--- a/
lib/Support/Allocator.cpp
+++ b/
lib/Support/Allocator.cpp
@@
-12,10
+12,10
@@
//===----------------------------------------------------------------------===//
#include "llvm/Support/Allocator.h"
//===----------------------------------------------------------------------===//
#include "llvm/Support/Allocator.h"
-#include "llvm/S
ystem
/DataTypes.h"
+#include "llvm/S
upport
/DataTypes.h"
#include "llvm/Support/Recycler.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Recycler.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/S
ystem
/Memory.h"
+#include "llvm/S
upport
/Memory.h"
#include <cstring>
namespace llvm {
#include <cstring>
namespace llvm {
@@
-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;