Patent ID: 6065095
Filing Date: 2000-05-16
Classification: G06F

Abstract:
In a disk drive having a buffer memory and means for connecting to a host computer, wherein the buffer memory is logically divided into a plurality of segments, and wherein the disk drive has a data structure means for indicating that a segment is chunked and for indicating that a segment is unchunked, wherein a segment that is designated to be chunked is logically divided into N chunks where N is an integer, and the disk drive further having a chunk array having N elements where each element is associated with a respective one of the chunks of the segment designated to be chunked, a method of allocating portions of the buffer memory, the method comprising the steps of:a) defining a unavailable data type to be stored in an element of the chunk array which indicates that the chunk is not available;b) defining an available data type to be stored in an element of the chunk array that indicates the chunk is available and that indicates the number of consecutive chunks that are available;c) receiving a data transfer request with a request length; andd) determining if the request length is less than a predetermined amount; computing a number of chunks needed to fit the request length; scanning the chunk array to find a largest available element whose available data type is greater than any other available data type and is greater than the number of chunks needed to fit the request length; and, starting from the largest available element, writing the used data type to a consecutive number of chunk array elements needed to fit the request length.