Small vectors in various sizes. These store a certain number of elements inline, and fall back
to the heap for larger allocations. This can be a useful optimization for improving cache
locality and reducing allocator traffic for workloads that fit within the inline buffer.
Shareable script_pubkey for UTXO: small scripts use inline storage; longer use Arc<[u8]>.
Clone is cheap (inline copies up to SHARED_BYTE_INLINE_CAP bytes, shared is Arc::clone). Serde matches ByteString.
Total Arc heap allocations created on IBD production paths.
Incremented at: download received_put (live + CHUNK_OBSOLETE drain),
local_block gap inject. Test dummies do not increment (not in MEM_REPORT).
Live Box<[Transaction]> whose heap size falls in jemalloc 768KiB–1.5MiB
large classes (n_tx * size_of::<Transaction>()). dest-ba 650k bins of
1.00 / 1.25 MiB are this size class (256 B × 4096 / 5120 txs).
Live count of SharedByteString instances using heap Arc<u8> (script > 25 bytes).
Each live Shared variant holds one Arc heap allocation of (16 + script_len) bytes.
If this grows unboundedly it means Arc<u8> script refs are being retained somewhere.
Pre-allocate a UtxoSet for n entries. Avoids costly reallocation spikes when loading large
checkpoints (at 50M entries the HashMap table alone is ~2.5 GB; a growth-triggered realloc
temporarily doubles that).