Patent ID: 6507901
Filing Date: 2003-01-14
Classification: G06F,Y10S

Abstract:
A method for allocating storage for a header and one or more data elements in a data storage facility where:the data storage facility is divided into words, each word includes one or more incidents of one or more types of alignment boundaries, each incident of a type of alignment boundary falls on a multiple of a base amount of units from the beginning of the word, the base amount being unique for each type of alignment boundary, each data element is required to satisfy an alignment requirement, which is the size of alignment boundary with which it is required to align, each data element has a length that is a multiple of its alignment requirement; and the method comprises computing a hole size, B, that is a portion of a word that would be unallocated if storage were allocated to the header and to the data elements in a preferred order; finding a subset of data elements S={Fi1, Fi2, . . . , Fin} that satisfy the following equation: (SizeModN(Fi1)+SizeModN(Fi2)+ . . . +SizeModN(Fin))modN=B where SizeModN(F) is the size of F modulo N, and N is the largest alignment requirement associated with any data element; allocating storage to data elements in S first; and allocating storage to the remaining data elements in the preferred order.