Use size_t instead of int to support a cache larger than 2G