US 11,954,032 B2
Apparatus for managing buffers and method thereof
Mark Tsung-Han Chiang, San Jose, CA (US); and Mei-Yao Lin, San Jose, CA (US)
Assigned to REALTEK SINGAPORE PRIVATE LIMITED, Singapore (SG)
Filed by Cortina Access, Inc., San Jose, CA (US)
Filed on Jan. 24, 2022, as Appl. No. 17/582,033.
Prior Publication US 2023/0236975 A1, Jul. 27, 2023
Int. Cl. G06F 12/0815 (2016.01)
CPC G06F 12/0815 (2013.01) [G06F 2212/1044 (2013.01)] 14 Claims
OG exemplary drawing
 
1. A method for managing buffers, comprising:
receiving a plurality of pieces of data, wherein the plurality of pieces of data comprises a first piece of data and a second piece of data;
allocating at least one buffer to establish a cluster buffer according to a data amount of the first piece of data;
storing the first piece of data in the cluster buffer; and
if at least one of a first condition and a second condition is satisfied, ending a storage operation of the cluster buffer, wherein
the first condition is that a total remaining space of the at least one buffer that has stored the data in the cluster buffer is less than a remaining space threshold, and the second condition is that the quantity of the at least one buffer that has stored the data in the cluster buffer reaches a cluster threshold,
before ending the storage operation of the cluster buffer, confirming whether the total remaining space is capable of accommodating the second piece of data, and if yes, storing the second piece of data in the cluster buffer, wherein a priority of the first piece of data and a priority of the second piece of data are the same.