util: improve cache collision behaviour
authorKeith Whitwell <keithw@vmware.com>
Wed, 22 Dec 2010 12:10:02 +0000 (12:10 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Mar 2011 11:16:53 +0000 (11:16 +0000)
commit20962bf547f7beabf3a5125552fff81a01136dbb
tree3abf98d97145318f7daa340fd6f6cc712a9d729e
parentd00cbf46cde0edee6d8f2c08e14458ef92ff0fbe
util: improve cache collision behaviour

Add linear probing on collisions.

Expand entry array by a fixed scale (currently 2) to help avoid
collisions.

Use a LRU approach to ensure that the number of entries stored in the
cache doesn't exceed the requested size.
src/gallium/auxiliary/util/u_cache.c