---
title: mask
framework: objectivec
role: article
role_heading: Article
path: objectivec/1808499-mask
---

# mask

An integer specifying the total number of allocated cache buckets (minus one). During method lookup, the Objective-C runtime uses this field to determine the index at which to begin a linear search of the buckets array. A pointer to a method’s selector is masked against this field using a logical AND operation (index = (mask & selector)). This serves as a simple hashing algorithm.

## See Also

### Fields

- [occupied](objectivec/1808501-occupied.md)
- [buckets](objectivec/1808503-buckets.md)
