Patent ID: 7558910

Claim:
A method in a computer system having a processor and a memory for implementing a circular buffer having a size, comprising: providing a buffer having a plurality of words in the memory, each word having an associated disabled forwarding bit; providing a pointer pointing to a word within the buffer; providing a number of forwarding words located adjacent to an end of the buffer in the memory, each forwarding word having an associated enabled forwarding bit and each forwarding word storing a pointer to a word within the buffer, the first forwarding word storing a pointer pointing to the first word in the buffer, each subsequent forwarding word storing a pointer pointing to the word in the buffer immediately following the word in the buffer pointed to by the pointer stored in the immediately preceding forwarding word, wherein the number of forwarding words is less than or equal to the number of words in the buffer; receiving from the processor a request to access a number of sequential words wherein a starting position for accessing data in the buffer is based on the pointer modulo the size of the buffer, a maximum number of words of the buffer to be accessed at a time corresponding to the number of forwarding words; selecting the word pointed to by the pointer modulo the size of the buffer; for each word to be accessed, starting with the selected word, retrieving the forwarding bit associated with the word to be accessed, when it is determined that the retrieved forwarding bit is disabled, accessing the word directly, and when it is determined that the retrieved forwarding bit is enabled, retrieving the pointer stored in the word and directing the access to the word within the buffer pointed to by the retrieved pointer; and incrementing the pointer by the number of words being accessed so that the buffer is accessed without checking for the end of the buffer.