mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add utility method to DenseMap to return the amount of memory used for its buckets.
llvm-svn: 130382
This commit is contained in:
parent
7bc992c8d3
commit
2cd5c3603f
@ -466,6 +466,15 @@ private:
|
||||
|
||||
NumEntries = 0;
|
||||
}
|
||||
|
||||
public:
|
||||
/// Return the approximate size (in bytes) of the actual map.
|
||||
/// This is just the raw memory used by DenseMap.
|
||||
/// If entries are pointers to objects, the size of the referenced objects
|
||||
/// are not included.
|
||||
size_t getMemorySize() const {
|
||||
return NumBuckets * sizeof(BucketT);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename KeyT, typename ValueT,
|
||||
|
Loading…
Reference in New Issue
Block a user