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

Function get_size_impl

deps/jemalloc/test/integration/mallocx.c:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20static size_t
21get_size_impl(const char *cmd, size_t ind) {
22 size_t ret;
23 size_t z;
24 size_t mib[4];
25 size_t miblen = 4;
26
27 z = sizeof(size_t);
28 assert_d_eq(mallctlnametomib(cmd, mib, &miblen),
29 0, "Unexpected mallctlnametomib(\"%s\", ...) failure", cmd);
30 mib[2] = ind;
31 z = sizeof(size_t);
32 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0),
33 0, "Unexpected mallctlbymib([\"%s\", %zu], ...) failure", cmd, ind);
34
35 return ret;
36}
37
38static size_t
39get_large_size(size_t ind) {

Callers 1

get_large_sizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected