MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / get_size_impl

Function get_size_impl

deps/jemalloc/test/integration/smallocx.c:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static size_t
41get_size_impl(const char *cmd, size_t ind) {
42 size_t ret;
43 size_t z;
44 size_t mib[4];
45 size_t miblen = 4;
46
47 z = sizeof(size_t);
48 assert_d_eq(mallctlnametomib(cmd, mib, &miblen),
49 0, "Unexpected mallctlnametomib(\"%s\", ...) failure", cmd);
50 mib[2] = ind;
51 z = sizeof(size_t);
52 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0),
53 0, "Unexpected mallctlbymib([\"%s\", %zu], ...) failure", cmd, ind);
54
55 return ret;
56}
57
58static size_t
59get_large_size(size_t ind) {

Callers 1

get_large_sizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected