Systems and methods for recovering memory
First Claim
1. A method for recovering blocks of memory, comprising:
- setting bits stored in a first device to a first value, each bit corresponding to one of a plurality of blocks in the memory;
retrieving a first tail pointer from a list indicating which of the plurality of blocks is available, the first tail pointer identifying a last available block of the plurality of blocks;
monitoring a de-allocation of each of the plurality of blocks;
setting, for each block of the plurality of blocks that is de-allocated, the corresponding bit in the first device to a second value;
detecting allocation of the last available block of the plurality of blocks;
starting a counter, the counter being configured to count for a predetermined time period;
reading, after the predetermined time period has elapsed, a second tail pointer associated with each of a plurality of second devices to which the plurality of blocks in the memory are capable of being allocated, each second tail pointer identifying one of the plurality of blocks;
setting bits in the first device corresponding to the blocks identified by the second tail pointers to the second value;
determining whether at least one of the bits in the first device has not been set to the second value; and
making, when at least one bit has not been set to the second value, the block corresponding to each of the at least one bit available for allocation to the plurality of second devices.
1 Assignment
0 Petitions
Accused Products
Abstract
A system includes a group of devices and a shared memory that is partitioned into blocks that are capable of being allocated to the group of devices using linked lists. The system also includes check logic configured to store a group of bits, where each bit corresponds to one of the blocks, and counter logic configured to count for a predetermined period of time. The system further includes logic configured to clear the group of bits stored in the check logic, cause the counter logic to count for the predetermined period of time, monitor a de-allocation of the blocks in the shared memory, set, for each of the blocks that is de-allocated during the predetermined period of time, the corresponding bit in the check logic, identify, after the predetermined period of time, one or more bits that have not been set, and mark the blocks corresponding to the one or more bits as available for allocation.
26 Citations
21 Claims
-
1. A method for recovering blocks of memory, comprising:
-
setting bits stored in a first device to a first value, each bit corresponding to one of a plurality of blocks in the memory; retrieving a first tail pointer from a list indicating which of the plurality of blocks is available, the first tail pointer identifying a last available block of the plurality of blocks; monitoring a de-allocation of each of the plurality of blocks; setting, for each block of the plurality of blocks that is de-allocated, the corresponding bit in the first device to a second value; detecting allocation of the last available block of the plurality of blocks; starting a counter, the counter being configured to count for a predetermined time period; reading, after the predetermined time period has elapsed, a second tail pointer associated with each of a plurality of second devices to which the plurality of blocks in the memory are capable of being allocated, each second tail pointer identifying one of the plurality of blocks; setting bits in the first device corresponding to the blocks identified by the second tail pointers to the second value; determining whether at least one of the bits in the first device has not been set to the second value; and making, when at least one bit has not been set to the second value, the block corresponding to each of the at least one bit available for allocation to the plurality of second devices. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system that includes a plurality of devices to which blocks in a shared memory are allocated using linked lists, a head/tail pointer memory that stores a head pointer and a tail pointer for each of the plurality of devices, and a free list that identifies available blocks in the shared memory and includes a free list tail pointer that identifies one of the blocks in the shared memory, the system comprising:
-
check logic configured to store bits corresponding to the blocks in the shared memory; a counter configured to count for a predetermined period of time; and control logic configured to; clear the bits in the check logic, read the free list tail pointer, monitor a de-allocation of the blocks in the shared memory, mark, for each of the blocks that is de-allocated, the corresponding bit in check logic, detect allocation of the block corresponding to the free list tail pointer, cause the counter to begin counting, read, after the predetermined period of time, the tail pointers for each of the plurality of devices from the head/tail pointer memory, mark, for each of the blocks that correspond to the read tail pointers, the corresponding bit in check logic, identify one or more bits in check logic that have not been marked, and mark the blocks corresponding to the identified one or more bits as available. - View Dependent Claims (7, 8, 9, 10, 11, 12)
-
-
13. A system that includes a plurality of devices and a shared memory that is partitioned into blocks that are capable of being allocated to the plurality of devices using linked lists, the system comprising:
-
check logic configured to store a plurality of bits, each bit corresponding to one of the plurality of blocks; counter logic configured to count for a predetermined period of time; and logic configured to; clear the plurality of bits in the check logic, cause the counter logic to count for the predetermined period of time, monitor a de-allocation of the plurality of blocks in the shared memory, set, for each of the plurality of blocks that is de-allocated during the predetermined period of time, the corresponding bit in check logic, identify, after the predetermined period of time, one or more bits that have not been set, and mark the blocks corresponding to the one or more bits as candidates for corruption. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
-
20. A method for recovering lost blocks of memory, comprising:
-
setting bits stored in a first device to a first value, each bit corresponding to one of a plurality of blocks in the memory; storing a first tail pointer from a list indicating which of the plurality of blocks is available, the first tail pointer identifying one available block of the plurality of blocks; monitoring a de-allocation of each of the plurality of blocks; setting, for each block of the plurality of blocks that is de-allocated, the corresponding bit in the first device to a second value; reading, after the one available block identified by the first tail pointer has been allocated, a second tail pointer associated with each of a plurality of second devices to which the plurality of blocks in the memory are capable of being allocated, each second tail pointer identifying one of the plurality of blocks; setting bits in the first device corresponding to the blocks identified by the second tail pointers to the second value; determining whether at least one of the bits in the first device has not been set to the second value; and making, when at least one bit has not been set to the second value, the block corresponding to each of the at least one bit available for allocation to the plurality of second devices.
-
-
21. A network device that includes a plurality of devices to which blocks in a shared memory are allocated using linked lists, a head/tail pointer memory that stores a head pointer and a tail pointer for each of the plurality of devices, and a free list that identifies available blocks in the shared memory and includes a free list tail pointer that identifies one of the blocks in the shared memory, the system comprising:
-
check logic configured to store bits corresponding to the blocks in the shared memory; and control logic configured to; clear the bits in the check logic, read the free list tail pointer, monitor a de-allocation of the blocks in the shared memory, mark, for each of the blocks that is de-allocated, the corresponding bit in check logic, read, after the one block has been allocated, the tail pointers for each of the plurality of devices from the head/tail pointer memory, mark, for each of the blocks that correspond to the read tail pointers, the corresponding bit in check logic, identify one or more bits in check logic that have not been marked, and mark the blocks corresponding to the identified one or more bits as available.
-
Specification