MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / sprintfTracedSize

Function sprintfTracedSize

src/library/common/trace_malloc.c:102–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static void
103sprintfTracedSize(char *str, size_t size)
104{
105 const char *suffix;
106
107 if (size < KIB * 10) {
108 suffix = "bytes";
109 }
110 else if (size < MIB * 10) {
111 suffix = "KiB";
112 size /= KIB;
113 }
114 else {
115 suffix = "MIB";
116 size /= MIB;
117 }
118
119 sprintf(str, "%lu %s", size, suffix);
120}
121
122static void
123printNodeInfo(ListNode *node)

Callers 3

printNodeInfoFunction · 0.85
printMallocStatisticsFunction · 0.85
printMemLeaksInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected