1. A method of restricting allocations in a cache, comprising: entering a restricted mode and allowing only a predetermined set of one or more types of instructions to allocate cache entries in the restricted mode; and exiting the restricted mode to enter a non-restricted mode and allowing any memory access instruction to allocate cache entries in the non-restricted mode.