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

Function MallocUsage

src/memusage.h:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 */
45
46static inline size_t MallocUsage(size_t alloc)
47{
48 // Measured on libc6 2.19 on Linux.
49 if (sizeof(void*) == 8) {
50 return ((alloc + 31) >> 4) << 4;
51 } else if (sizeof(void*) == 4) {
52 return ((alloc + 15) >> 3) << 3;
53 } else {
54 assert(0);
55 }
56}
57
58// STL data structures
59

Callers 3

DynamicUsageFunction · 0.85
IncrementalDynamicUsageFunction · 0.85
DynamicMemoryUsageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected