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

Function bucket_select

freebsd/vm/uma_core.c:443–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443static int
444bucket_select(int size)
445{
446 struct uma_bucket_zone *ubz;
447
448 ubz = &bucket_zones[0];
449 if (size > ubz->ubz_maxsize)
450 return MAX((ubz->ubz_maxsize * ubz->ubz_entries) / size, 1);
451
452 for (; ubz->ubz_entries != 0; ubz++)
453 if (ubz->ubz_maxsize < size)
454 break;
455 ubz--;
456 return (ubz->ubz_entries);
457}
458
459static uma_bucket_t
460bucket_alloc(uma_zone_t zone, void *udata, int flags)

Callers 1

zone_ctorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected