Patent ID: 11954032
Assignee: REALTEK SINGAPORE PRIVATE LIMITED
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G

Claim 0:
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.