Bitcoin Core 28.99.0
P2P Digital Currency
|
Helper to get access to private parts of PoolResource. More...
#include <poolresourcetester.h>
Classes | |
struct | PtrAndBytes |
Static Public Member Functions | |
template<std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES> | |
static std::vector< std::size_t > | FreeListSizes (const PoolResource< MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > &resource) |
Extracts the number of elements per freelist. More... | |
template<std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES> | |
static std::size_t | AvailableMemoryFromChunk (const PoolResource< MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > &resource) |
How many bytes are still available from the last allocated chunk. More... | |
template<std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES> | |
static void | CheckAllDataAccountedFor (const PoolResource< MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES > &resource) |
Once all blocks are given back to the resource, tests that the freelists are consistent: More... | |
Helper to get access to private parts of PoolResource.
Used in unit tests and in the fuzzer
Definition at line 19 of file poolresourcetester.h.
|
inlinestatic |
How many bytes are still available from the last allocated chunk.
Definition at line 62 of file poolresourcetester.h.
|
inlinestatic |
Once all blocks are given back to the resource, tests that the freelists are consistent:
Definition at line 75 of file poolresourcetester.h.
|
inlinestatic |
Extracts the number of elements per freelist.
Definition at line 44 of file poolresourcetester.h.