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

Function hash_sfind

freebsd/vm/uma_int.h:603–616  ·  view source on GitHub ↗

* Find a slab within a hash table. This is used for OFFPAGE zones to lookup * the slab structure. * * Arguments: * hash The hash table to search. * data The base page of the item. * * Returns: * A pointer to a slab if successful, else NULL. */

Source from the content-addressed store, hash-verified

601 * A pointer to a slab if successful, else NULL.
602 */
603static __inline uma_slab_t
604hash_sfind(struct uma_hash *hash, uint8_t *data)
605{
606 uma_hash_slab_t slab;
607 u_int hval;
608
609 hval = UMA_HASH(hash, data);
610
611 LIST_FOREACH(slab, &hash->uh_slab_hash[hval], uhs_hlink) {
612 if ((uint8_t *)slab->uhs_data == data)
613 return (&slab->uhs_slab);
614 }
615 return (NULL);
616}
617
618#ifndef FSTACK
619static __inline uma_slab_t

Callers 2

zone_releaseFunction · 0.70
uma_dbg_getslabFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected