[#memusage-DynamicUsage-06c] = xref:memusage.adoc[memusage]::DynamicUsage :relfileprefix: ../ :mrdocs: `DynamicUsage` overloads == Synopses Declared in `<memusage.h>` Dynamic memory used by a list's nodes. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename X> static size_t xref:memusage/DynamicUsage-02.adoc[DynamicUsage](std::list<X> const& l); ---- [.small]#xref:memusage/DynamicUsage-02.adoc[_» more..._]# Dynamic memory owned by a shared_ptr, including its control block. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename X> static size_t xref:memusage/DynamicUsage-0f.adoc[DynamicUsage](std::shared_ptr<X> const& p); ---- [.small]#xref:memusage/DynamicUsage-0f.adoc[_» more..._]# Dynamic memory owned by a unique_ptr. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename X> static size_t xref:memusage/DynamicUsage-07.adoc[DynamicUsage](std::unique_ptr<X> const& p); ---- [.small]#xref:memusage/DynamicUsage-07.adoc[_» more..._]# Dynamic memory usage of a raw pointer is zero (the pointee is not owned). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename X> static size_t xref:memusage/DynamicUsage-05f.adoc[DynamicUsage](X const*& v); ---- [.small]#xref:memusage/DynamicUsage-05f.adoc[_» more..._]# Dynamic memory usage of a raw pointer‐to‐const is zero (the pointee is not owned). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename X> static size_t xref:memusage/DynamicUsage-0a.adoc[DynamicUsage](X const const*& v); ---- [.small]#xref:memusage/DynamicUsage-0a.adoc[_» more..._]# Dynamic memory used by an indirectmap's tree nodes. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename X, typename Y> static size_t xref:memusage/DynamicUsage-09.adoc[DynamicUsage](xref:indirectmap.adoc[indirectmap<X, Y>] const& m); ---- [.small]#xref:memusage/DynamicUsage-09.adoc[_» more..._]# Dynamic memory used by a set's tree nodes. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename X, typename Y> static size_t xref:memusage/DynamicUsage-061.adoc[DynamicUsage](std::set<X, Y> const& s); ---- [.small]#xref:memusage/DynamicUsage-061.adoc[_» more..._]# Dynamic memory used by an unordered_set's nodes and bucket array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename X, typename Y> static size_t xref:memusage/DynamicUsage-051.adoc[DynamicUsage](std::unordered_set<X, Y> const& s); ---- [.small]#xref:memusage/DynamicUsage-051.adoc[_» more..._]# Dynamic memory used by a vector's element buffer. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename Allocator> static size_t xref:memusage/DynamicUsage-0d.adoc[DynamicUsage](std::vector<T, Allocator> const& v); ---- [.small]#xref:memusage/DynamicUsage-0d.adoc[_» more..._]# Dynamic memory used by a map's tree nodes. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename X, typename Y, typename Z> static size_t xref:memusage/DynamicUsage-081.adoc[DynamicUsage](std::map<X, Y, Z> const& m); ---- [.small]#xref:memusage/DynamicUsage-081.adoc[_» more..._]# Dynamic memory used by an unordered_map's nodes and bucket array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename X, typename Y, typename Z> static size_t xref:memusage/DynamicUsage-00.adoc[DynamicUsage](std::unordered_map<X, Y, Z> const& m); ---- [.small]#xref:memusage/DynamicUsage-00.adoc[_» more..._]# Dynamic memory used by a prevector's overflow buffer. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< unsigned int N, typename X, typename S, typename D> static size_t xref:memusage/DynamicUsage-084.adoc[DynamicUsage](xref:prevector-0c.adoc[prevector<N, X, S, D>] const& v); ---- [.small]#xref:memusage/DynamicUsage-084.adoc[_» more..._]# Dynamic memory used by a pool‐allocated unordered_map, including the pool resource. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class Key, class T, class Hash, class Pred, std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES> static size_t xref:memusage/DynamicUsage-01.adoc[DynamicUsage](std::unordered_map<Key, T, Hash, Pred, PoolAllocator<std::pair<Key const, T>, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>> const& m); ---- [.small]#xref:memusage/DynamicUsage-01.adoc[_» more..._]# == Return Value * The bytes allocated for all of the list's nodes. * The bytes allocated for the pointee and control block, or 0 if empty. * The bytes allocated for the pointee, or 0 if empty. * Always 0. * The bytes allocated for all of the map's nodes. * The bytes allocated for all of the set's nodes. * The bytes allocated for the nodes plus the bucket array. * The bytes allocated for the vector's capacity. * The bytes allocated outside the prevector's inline storage. * The bytes allocated for the pool chunks plus the bucket array. == Parameters [cols="1,4"] |=== | Name| Description | *l* | The list to measure. | *p* | The shared_ptr to measure. | *v* | The pointer whose dynamic usage is queried. | *m* | The indirectmap to measure. | *s* | The set to measure. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#