mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
memusage: Allow counting usage of vectors with different allocators
This commit is contained in:
parent
6463117a29
commit
7596282a55
1 changed files with 3 additions and 3 deletions
|
|
@ -84,10 +84,10 @@ struct stl_shared_counter
|
|||
size_t weak_count;
|
||||
};
|
||||
|
||||
template<typename X>
|
||||
static inline size_t DynamicUsage(const std::vector<X>& v)
|
||||
template<typename T, typename Allocator>
|
||||
static inline size_t DynamicUsage(const std::vector<T, Allocator>& v)
|
||||
{
|
||||
return MallocUsage(v.capacity() * sizeof(X));
|
||||
return MallocUsage(v.capacity() * sizeof(T));
|
||||
}
|
||||
|
||||
template<unsigned int N, typename X, typename S, typename D>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue