A method may involve assigning each of a plurality of freelists and a plurality
of hashlists used to implement a cache to one of a plurality of lock groups and
acquiring one of a plurality of locks. Objects on each freelist and hashlist that
are assigned to the same lock group are allocated from the same one of a plurality
of memory allocation pools. Each lock group is associated with a respective one
of the plurality of locks. Acquiring the lock locks a freelist and several hashlists
included in an associated lock group of the plurality of lock groups.