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

Function note_procstat_rlimit

freebsd/kern/imgact_elf.c:2530–2551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2528}
2529
2530static void
2531note_procstat_rlimit(void *arg, struct sbuf *sb, size_t *sizep)
2532{
2533 struct proc *p;
2534 struct rlimit rlim[RLIM_NLIMITS];
2535 size_t size;
2536 int structsize, i;
2537
2538 p = (struct proc *)arg;
2539 size = sizeof(structsize) + sizeof(rlim);
2540 if (sb != NULL) {
2541 KASSERT(*sizep == size, ("invalid size"));
2542 structsize = sizeof(rlim);
2543 sbuf_bcat(sb, &structsize, sizeof(structsize));
2544 PROC_LOCK(p);
2545 for (i = 0; i < RLIM_NLIMITS; i++)
2546 lim_rlimit_proc(p, i, &rlim[i]);
2547 PROC_UNLOCK(p);
2548 sbuf_bcat(sb, rlim, sizeof(rlim));
2549 }
2550 *sizep = size;
2551}
2552
2553static void
2554note_procstat_osrel(void *arg, struct sbuf *sb, size_t *sizep)

Callers

nothing calls this directly

Calls 2

sbuf_bcatFunction · 0.85
lim_rlimit_procFunction · 0.70

Tested by

no test coverage detected