mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Add utility method to DenseMap to return the amount of memory used for its buckets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
235b830328
commit
e6b693db8c
@ -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…
x
Reference in New Issue
Block a user