MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / MallocUsage

Function MallocUsage

src/memusage.h:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 */
51
52static inline size_t MallocUsage(size_t alloc)
53{
54 // Measured on libc6 2.19 on Linux.
55 if (alloc == 0) {
56 return 0;
57 } else if (sizeof(void*) == 8) {
58 return ((alloc + 31) >> 4) << 4;
59 } else if (sizeof(void*) == 4) {
60 return ((alloc + 15) >> 3) << 3;
61 } else {
62 assert(0);
63 }
64}
65
66// STL data structures
67

Callers 6

DynamicUsageFunction · 0.85
IncrementalDynamicUsageFunction · 0.85
TotalMemoryUsageMethod · 0.85
DynamicMemoryUsageMethod · 0.85
MemUsageFunction · 0.85
BOOST_FIXTURE_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 1

BOOST_FIXTURE_TEST_CASEFunction · 0.68