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

Function kread_symbol

tools/libmemstat/memstat_malloc.c:296–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296static int
297kread_symbol(kvm_t *kvm, int index, void *address, size_t size,
298 size_t offset)
299{
300 ssize_t ret;
301
302 ret = kvm_read(kvm, namelist[index].n_value + offset, address, size);
303 if (ret < 0)
304 return (MEMSTAT_ERROR_KVM);
305 if ((size_t)ret != size)
306 return (MEMSTAT_ERROR_KVM_SHORTREAD);
307 return (0);
308}
309
310static int
311kread_zpcpu(kvm_t *kvm, u_long base, void *buf, size_t size, int cpu)

Callers 2

memstat_kvm_mallocFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected