* Initialize bucket_zones, the array of zones of buckets of various sizes. * * For each zone, calculate the memory required for each bucket, consisting * of the header and an array of pointers. */
| 409 | * of the header and an array of pointers. |
| 410 | */ |
| 411 | static void |
| 412 | bucket_init(void) |
| 413 | { |
| 414 | struct uma_bucket_zone *ubz; |
| 415 | int size; |
| 416 | |
| 417 | for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { |
| 418 | size = roundup(sizeof(struct uma_bucket), sizeof(void *)); |
| 419 | size += sizeof(void *) * ubz->ubz_entries; |
| 420 | ubz->ubz_zone = uma_zcreate(ubz->ubz_name, size, |
| 421 | NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, |
| 422 | UMA_ZONE_MTXCLASS | UMA_ZFLAG_BUCKET | |
| 423 | UMA_ZONE_FIRSTTOUCH); |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | /* |
| 428 | * Given a desired number of entries for a bucket, return the zone from which |
no test coverage detected