[#CTxMemPool-TrimToSize] = xref:CTxMemPool.adoc[CTxMemPool]::TrimToSize :relfileprefix: ../ :mrdocs: Remove transactions from the mempool until its dynamic size is <= sizelimit. pvNoSpendsRemaining, if set, will be populated with the list of outpoints which are not in mempool which no longer have any spends in this mempool. == Synopsis Declared in `<txmempool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f95135d3128), requires_capability(0x7f9501b12508), requires_capability(0x7f950ec786f8), requires_capability(0x7f9525ea8448), requires_capability(0x7f9515097b88), requires_capability(0x7f950826be28), requires_capability(0x7f94f856f538), requires_capability(0x7f9513c59728)]] void TrimToSize( size_t sizelimit, std::vector<COutPoint>* pvNoSpendsRemaining = nullptr); ---- == Parameters [cols="1,4"] |=== | Name| Description | *sizelimit* | The target maximum dynamic memory size, in bytes. | *pvNoSpendsRemaining* | If set, receives outpoints no longer spent by the mempool. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#