MCPcopy Create free account
hub / github.com/ElementsProject/elements / MallocUsage

Function MallocUsage

src/memusage.h:50–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

DynamicMemoryUsageMethod · 0.85
DynamicUsageFunction · 0.85
IncrementalDynamicUsageFunction · 0.85
DynamicMemoryUsageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected