Re-use of invalidated data in buffers
First Claim
Patent Images
1. In a computing environment, a method of reusing data stored in a ring buffer in memory, the method comprising:
- accessing data in a first portion of the ring buffer in the memory, the ring buffer in the memory comprising a first pointer that points to a location where a free portion of the ring buffer in the memory begins, and a second pointer that points to a location where the free portion of the ring buffer in the memory ends;
invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory as free, but where the data in the first portion of the ring buffer in the memory is not yet overwritten, wherein invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory as free comprises moving the second pointer past the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory;
determining to reuse a portion of the data in the first portion of the ring buffer in the memory for an operation after the data in the first portion of the ring buffer in the memory has been invalidated by the first portion of the ring buffer in the memory being marked as free;
determining, based on the position of the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory, including a determination of how much of the data in the first portion of the ring buffer in the memory will be used for the operation and will be revalidated by moving the second pointer to include the first portion of the ring buffer in the memory to an active valid portion of the ring buffer in the memory compared to how much data in the free portion of the ring buffer in memory will not be used for the operation but will be revalidated by moving the second pointer, an action to perform; and
performing the determined action, wherein the determined action is selected from the group comprising;
moving the second pointer to revalidate the data in the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation meets a threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer; and
copying the portion of the data in the first portion of the ring buffer in the memory that is used for the operation, re-writing the portion of the data in the first portion of the ring buffer in the memory that is used for the operation to the ring buffer in the memory, and moving the first pointer in the ring buffer in the memory to include the re-written data in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation does not meet the threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer.
2 Assignments
0 Petitions
Accused Products
Abstract
Reusing data in a memory buffer. A method includes reading data into a first portion of memory of a buffer implemented in the memory. The method further includes invalidating the data and marking the first portion of memory as free such that the first portion of memory is marked as being usable for storing other data, but where the data is not yet overwritten. The method further includes reusing the data in the first portion of memory after the data has been invalidated and the first portion of the memory is marked as free.
-
Citations
14 Claims
-
1. In a computing environment, a method of reusing data stored in a ring buffer in memory, the method comprising:
-
accessing data in a first portion of the ring buffer in the memory, the ring buffer in the memory comprising a first pointer that points to a location where a free portion of the ring buffer in the memory begins, and a second pointer that points to a location where the free portion of the ring buffer in the memory ends; invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory as free, but where the data in the first portion of the ring buffer in the memory is not yet overwritten, wherein invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory as free comprises moving the second pointer past the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory; determining to reuse a portion of the data in the first portion of the ring buffer in the memory for an operation after the data in the first portion of the ring buffer in the memory has been invalidated by the first portion of the ring buffer in the memory being marked as free; determining, based on the position of the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory, including a determination of how much of the data in the first portion of the ring buffer in the memory will be used for the operation and will be revalidated by moving the second pointer to include the first portion of the ring buffer in the memory to an active valid portion of the ring buffer in the memory compared to how much data in the free portion of the ring buffer in memory will not be used for the operation but will be revalidated by moving the second pointer, an action to perform; and performing the determined action, wherein the determined action is selected from the group comprising; moving the second pointer to revalidate the data in the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation meets a threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer; and copying the portion of the data in the first portion of the ring buffer in the memory that is used for the operation, re-writing the portion of the data in the first portion of the ring buffer in the memory that is used for the operation to the ring buffer in the memory, and moving the first pointer in the ring buffer in the memory to include the re-written data in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation does not meet the threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer. - View Dependent Claims (2, 3, 4, 5)
-
-
6. In a computing environment, a physical computer readable device comprising computer executable instructions that when executed by one or more processors cause the following to be performed:
-
accessing data in a first portion of a ring buffer in a memory, the ring buffer in the memory comprising a first pointer that points to a location where a free portion of the ring buffer in the memory begins, and a second pointer that points to a location where the free portion of the ring buffer in the memory ends; invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory as free, but where the data in the first portion of the ring buffer in the memory is not yet overwritten, wherein invalidating the data in the first portion of the ring buffer in the memory by marking the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory;
determining to reuse a portion of the data in the first portion of the ring buffer in the memory for an operation after the data in the first portion of the ring buffer in the memory has been invalidated by the first portion of the ring buffer in the memory being marked as free;determining, based on the position of the first portion of the ring buffer in the memory in the free portion of the ring buffer in the memory, including a determination of how much of the data in the first portion of the ring buffer in the memory will be used for the operation and will be revalidated by moving the second pointer to include the first portion of the ring buffer in the memory to an active valid portion of the ring buffer in the memory compared to how much data in the free portion of the ring buffer in memory will not be used for the operation but will be revalidated by moving the second pointer, an action to perform; and performing the determined action, wherein the determined action is selected from the group comprising; moving the second pointer to revalidate the data in the first portion of the ring buffer in the memory to include the first portion of the ring buffer in the memory in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation meets a threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer; and copying the portion of the data in the first portion of the ring buffer in the memory that is used for the operation, re-writing the portion of the data in the first portion of the ring buffer in the memory that is used for the operation to the active valid portion of the ring buffer in the memory, and moving the first pointer in the ring buffer in the memory to include the re-written data in the active valid portion of the ring buffer in the memory, if the portion of the data in the first portion of the ring buffer in the memory that is used for the operation does not meet the threshold with respect to the data in the free portion of the ring buffer in memory that would be revalidated but not used for the operation by moving the second pointer. - View Dependent Claims (7, 8, 9, 10)
-
-
11. In a computing environment, a system for reusing data stored in a ring buffer in system memory, the system comprising:
-
the ring buffer implemented in the system memory; one or more processors; one or more physical computer readable devices coupled to the one or more processors, wherein the one or more physical computer readable devices comprise computer executable instructions that when executed by one or more of the one or more processors cause the following to be performed; accessing data in a first portion of the ring buffer in the system memory, the ring buffer in the system memory comprising a first pointer that points to a location where a free portion of the ring buffer in the system memory begins, and a second pointer that points to a location where the free portion of the ring buffer in the system memory ends; invalidating the data in the first portion of the ring buffer in the system memory by marking the first portion of the ring buffer in the system memory as free, but where the data in the first portion of the ring buffer in the system memory is not yet overwritten, wherein invalidating the data in the first portion of the ring buffer in the system memory by marking the first portion of the ring buffer in the system memory as free comprises moving the second pointer past the first portion of the ring buffer in the system memory to include the first portion of the ring buffer in the system memory in the free portion of the ring buffer in the system memory; determining to reuse a portion of the data in the first portion of the ring buffer in the system memory for an operation after the data in the first portion of the ring buffer in the system memory has been invalidated by the first portion of the ring buffer in the system memory being marked as free; determining, based on the position of the first portion of the ring buffer in the system memory in the free portion of the ring buffer in the system memory, including a determination of how much of the data in the first portion of the ring buffer in the system memory will be used for the operation and will be revalidated by moving the second pointer to include the first portion of the ring buffer in the system memory to an active valid portion of the ring buffer in the system memory compared to how much data in the free portion of the ring buffer in the system memory will not be used for the operation but will be revalidated by moving the second pointer, an action to perform; and performing the action, wherein the determined action is selected from the group comprising; moving the second pointer to revalidate the data in the first portion of the ring buffer in the system memory to include the first portion of the ring buffer in the system memory in the active valid portion of the ring buffer in the system memory, if the portion of the data in the first portion of the ring buffer in the system memory that is used for the operation meets a threshold with respect to the data in the free portion that would be revalidated but not used for the operation by moving the second pointer; and copying the portion of the data in the first portion of the ring buffer in the system memory that is used for the operation, re-writing the portion of the data in the first portion of the ring buffer in the system memory that is used for the operation to the active valid portion of the ring buffer in the system memory, and moving the first pointer in the ring buffer in the system memory to include the re-written data in the active valid portion of the ring buffer in the system memory, if the portion of the data in the first portion of the ring buffer in the system memory that is used for the operation does not meet the threshold with respect to the data in the free portion that would be revalidated but not used for the operation by moving the second pointer. - View Dependent Claims (12, 13, 14)
-
Specification