X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FAllocator.h;h=a2ad24ffead93bd995f50101e9c37063e30e9960;hb=a00b80b04c5edb08639c1c6b32e9231fd8b066f7;hp=b080e222a108181426fce6eab25664491f97cf33;hpb=1f6efa3996dd1929fbc129203ce5009b620e6969;p=oota-llvm.git diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index b080e222a10..a2ad24ffead 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -23,6 +23,8 @@ #include namespace llvm { +template struct ReferenceAdder { typedef T& result; }; +template struct ReferenceAdder { typedef T result; }; class MallocAllocator { public: @@ -175,6 +177,9 @@ public: unsigned GetNumSlabs() const; void PrintStats() const; + + /// Compute the total physical memory allocated by this allocator. + size_t getTotalMemory() const; }; /// SpecificBumpPtrAllocator - Same as BumpPtrAllocator but allows only