Patent ID: 8274521

Claim:
A method for allocating at least one of a plurality of pages of a physical memory in a computer, comprising: receiving an indication of a requirement to allocate the at least one page of the plurality of pages for a process, wherein the plurality of pages are associated with a plurality of cache colors; generating, by a processor, a selection bitmap by performing a logical operation of a system available colors bitmap and a process bitmap, wherein the system available colors bitmap and the process bitmap each include one bit corresponding to each of the plurality of cache colors, wherein each bit of the system available colors bitmap indicates whether a number of pages associated with a corresponding cache color that are available to be allocated is above a minimum threshold, and wherein each bit of the process bitmap indicates whether any pages associated with the corresponding cache color have been recently allocated for the process; selecting, using the selection bitmap, a cache color of the plurality of cache colors; and allocating a page of the plurality of pages for the process, wherein the allocated page is associated with the selected cache color.