Patent ID: 7168085

Claim:
A method comprising: allocating different-size portions of memory to store program data for corresponding time units represented in an electronic program guide; and selecting different-size sets of the program data for storage in the portions of memory such that more of the program data will be stored in one portion of memory corresponding to one time unit and less of the program data will be stored in another portion of memory for another time unit, wherein the selecting comprises: making a first pass from a furthest time unit back toward a current time unit and determining at each time unit whether the program data for the time unit fits in the portion of memory allocated for the time unit and shifting any remaining space to the portion of memory allocated for a next time unit closer to the current time unit; and making a second pass from the current time unit out to the furthest time unit and determining at each time unit whether any additional program data for the time unit can be added to the portion of memory allocated for the time unit and shifting any remaining space to the portion of memory allocated for a next time unit closer to the furthest time unit.