MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kread_symbol

Function kread_symbol

tools/libmemstat/memstat_uma.c:299–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299static int
300kread_symbol(kvm_t *kvm, int index, void *address, size_t size,
301 size_t offset)
302{
303 ssize_t ret;
304
305 ret = kvm_read(kvm, namelist[index].n_value + offset, address, size);
306 if (ret < 0)
307 return (MEMSTAT_ERROR_KVM);
308 if ((size_t)ret != size)
309 return (MEMSTAT_ERROR_KVM_SHORTREAD);
310 return (0);
311}
312
313/*
314 * memstat_kvm_uma() is similar to memstat_sysctl_uma(), only it extracts

Callers 1

memstat_kvm_umaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected