[#memusage-DynamicUsage-06c]
= xref:memusage.adoc[memusage]::DynamicUsage
:relfileprefix: ../
:mrdocs:

`DynamicUsage` overloads

== Synopses

Declared in `&lt;memusage&period;h&gt;`

Dynamic memory used by a list&apos;s nodes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename X&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-02.adoc[DynamicUsage](std::list&lt;X&gt; const& l);
----

[.small]#xref:memusage/DynamicUsage-02.adoc[_» more&period;&period;&period;_]#

Dynamic memory owned by a shared&lowbar;ptr, including its control block&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename X&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-0f.adoc[DynamicUsage](std::shared&lowbar;ptr&lt;X&gt; const& p);
----

[.small]#xref:memusage/DynamicUsage-0f.adoc[_» more&period;&period;&period;_]#

Dynamic memory owned by a unique&lowbar;ptr&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename X&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-07.adoc[DynamicUsage](std::unique&lowbar;ptr&lt;X&gt; const& p);
----

[.small]#xref:memusage/DynamicUsage-07.adoc[_» more&period;&period;&period;_]#

Dynamic memory usage of a raw pointer is zero (the pointee is not owned)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename X&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-05f.adoc[DynamicUsage](X const*& v);
----

[.small]#xref:memusage/DynamicUsage-05f.adoc[_» more&period;&period;&period;_]#

Dynamic memory usage of a raw pointer&hyphen;to&hyphen;const is zero (the pointee is not owned)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename X&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-0a.adoc[DynamicUsage](X const const*& v);
----

[.small]#xref:memusage/DynamicUsage-0a.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by an indirectmap&apos;s tree nodes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename X,
    typename Y&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-09.adoc[DynamicUsage](xref:indirectmap.adoc[indirectmap&lt;X, Y&gt;] const& m);
----

[.small]#xref:memusage/DynamicUsage-09.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by a set&apos;s tree nodes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename X,
    typename Y&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-061.adoc[DynamicUsage](std::set&lt;X, Y&gt; const& s);
----

[.small]#xref:memusage/DynamicUsage-061.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by an unordered&lowbar;set&apos;s nodes and bucket array&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename X,
    typename Y&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-051.adoc[DynamicUsage](std::unordered&lowbar;set&lt;X, Y&gt; const& s);
----

[.small]#xref:memusage/DynamicUsage-051.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by a vector&apos;s element buffer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename Allocator&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-0d.adoc[DynamicUsage](std::vector&lt;T, Allocator&gt; const& v);
----

[.small]#xref:memusage/DynamicUsage-0d.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by a map&apos;s tree nodes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename X,
    typename Y,
    typename Z&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-081.adoc[DynamicUsage](std::map&lt;X, Y, Z&gt; const& m);
----

[.small]#xref:memusage/DynamicUsage-081.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by an unordered&lowbar;map&apos;s nodes and bucket array&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename X,
    typename Y,
    typename Z&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-00.adoc[DynamicUsage](std::unordered&lowbar;map&lt;X, Y, Z&gt; const& m);
----

[.small]#xref:memusage/DynamicUsage-00.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by a prevector&apos;s overflow buffer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    unsigned int N,
    typename X,
    typename S,
    typename D&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-084.adoc[DynamicUsage](xref:prevector-0c.adoc[prevector&lt;N, X, S, D&gt;] const& v);
----

[.small]#xref:memusage/DynamicUsage-084.adoc[_» more&period;&period;&period;_]#

Dynamic memory used by a pool&hyphen;allocated unordered&lowbar;map, including the pool resource&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class Key,
    class T,
    class Hash,
    class Pred,
    std::size&lowbar;t MAX&lowbar;BLOCK&lowbar;SIZE&lowbar;BYTES,
    std::size&lowbar;t ALIGN&lowbar;BYTES&gt;
static
size&lowbar;t
xref:memusage/DynamicUsage-01.adoc[DynamicUsage](std::unordered&lowbar;map&lt;Key, T, Hash, Pred, PoolAllocator&lt;std::pair&lt;Key const, T&gt;, MAX&lowbar;BLOCK&lowbar;SIZE&lowbar;BYTES, ALIGN&lowbar;BYTES&gt;&gt; const& m);
----

[.small]#xref:memusage/DynamicUsage-01.adoc[_» more&period;&period;&period;_]#

== Return Value

* The bytes allocated for all of the list&apos;s nodes&period;
* The bytes allocated for the pointee and control block, or 0 if empty&period;
* The bytes allocated for the pointee, or 0 if empty&period;
* Always 0&period;
* The bytes allocated for all of the map&apos;s nodes&period;
* The bytes allocated for all of the set&apos;s nodes&period;
* The bytes allocated for the nodes plus the bucket array&period;
* The bytes allocated for the vector&apos;s capacity&period;
* The bytes allocated outside the prevector&apos;s inline storage&period;
* The bytes allocated for the pool chunks plus the bucket array&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *l*
| The list to measure&period;
| *p*
| The shared&lowbar;ptr to measure&period;
| *v*
| The pointer whose dynamic usage is queried&period;
| *m*
| The indirectmap to measure&period;
| *s*
| The set to measure&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
