[#BloombergLP-bslma-TestAllocatorMonitor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocatorMonitor
:relfileprefix: ../../
:mrdocs:

Mechanism that reports changes in a `TestAllocator`&apos;s statistics&period;

== Synopsis

Declared in `&lt;bslma&lowbar;testallocatormonitor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TestAllocatorMonitor;
----

== Description

This mechanism provides a set of boolean accessor methods indicating whether a change has occurred in the state of the `TestAllocator` object (supplied at construction) since the construction of the monitor&period; See the  section for the statics tracked&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocatorMonitor/2constructor.adoc[`TestAllocatorMonitor`]         [.small]#[constructor]#
| Create a `TestAllocatorMonitor` object to track changes in statistics of the specified `testAllocator`&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/2destructor.adoc[`&#126;TestAllocatorMonitor`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isInUseDown.adoc[`isInUseDown`] 
| Return `true` if the `numBlocksInUse` statistic of the tracked test allocator has decreased since construction of this monitor, and `false` otherwise&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isInUseSame.adoc[`isInUseSame`] 
| Return `true` if the `numBlocksInUse` statistic is unchanged&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isInUseUp.adoc[`isInUseUp`] 
| Return `true` if the `numBlocksInUse` statistic has increased&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isMaxSame.adoc[`isMaxSame`] 
| Return `true` if the `numBlocksMax` statistic of the tracked test allocator has not changed since construction of this monitor, and `false` otherwise&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isMaxUp.adoc[`isMaxUp`] 
| Return `true` if the `numBlocksMax` statistic has increased&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isTotalSame.adoc[`isTotalSame`] 
| Return `true` if the `numBlocksTotal` statistic is unchanged&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/isTotalUp.adoc[`isTotalUp`] 
| Return `true` if the `numBlocksTotal` statistic has increased&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/numBlocksInUseChange.adoc[`numBlocksInUseChange`] 
| Return the change in the `numBlocksInUse` statistic&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/numBlocksMaxChange.adoc[`numBlocksMaxChange`] 
| Return the change in the `numBlocksMax` statistic&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/numBlocksTotalChange.adoc[`numBlocksTotalChange`] 
| Return the change in the `numBlocksTotal` statistic of the tracked test allocator since construction of this monitor&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor/reset.adoc[`reset`] 
| Change the allocator monitored by this object&period;
|===



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