| 322 | "Nth character in the malloc type short description."); |
| 323 | |
| 324 | static void |
| 325 | mtp_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 | |
| 341 | static inline u_int |
| 342 | mtp_get_subzone(struct malloc_type *mtp) |