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

Function mtp_set_subzone

freebsd/kern/kern_malloc.c:324–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 "Nth character in the malloc type short description.");
323
324static void
325mtp_set_subzone(struct malloc_type *mtp)
326{
327 struct malloc_type_internal *mtip;
328 const char *desc;
329 size_t len;
330 u_int val;
331
332 mtip = &mtp->ks_mti;
333 desc = mtp->ks_shortdesc;
334 if (desc == NULL || (len = strlen(desc)) == 0)
335 val = 0;
336 else
337 val = desc[zone_offset % len];
338 mtip->mti_zone = (val % numzones);
339}
340
341static inline u_int
342mtp_get_subzone(struct malloc_type *mtp)

Callers 1

malloc_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected