摘要 |
A system for allocating storage of incoming data packets into a memory of a packet processor has a first facility mapping a first block of memory of a fixed block size in bytes into an ordered plurality of atomic pages comprising each a fixed byte size, a second facility mapping the same block of memory into ordered virtual pages of different sizes, ranging from a smaller virtual page size equal to the atomic page size up to a larger virtual page size equal to the fixed block size, a third facility to allocate virtual pages as unavailable for storage or de-allocate virtual pages as available for storage, a fourth facility to receive a data packet, ascertain packet size for the received packet, and to determine fit by checking allocation state for virtual pages of a smallest size that is equal to or larger than the packet size, then allocation state for next larger virtual pages, and so on, until a de-allocated, available virtual page is found; and a fifth facility to select a virtual page to store the packet, and to update and mark associated atomic pages in the selected virtual page as available or unavailable for storage, in an ordered manner. The system is characterized in that, after each selection by the fifth facility, state of all atomic and virtual pages is updated.
|