摘要 |
A shared memory clean application system assigns a process name to each process operating within a shared memory region and stores that name in shared memory elements used by that process. If there are more processes sharing an element than that element has space to keep the names, an overflow element is created and linked to the shared element. When a new element is requested and no free elements are available, the invention selects an element, clears its use count, and then reviews all the names in that shared element array to see if they match existing valid processes. If an existing process is found that matches a name in the array, the use count is incremented for that process. If no existing process match is found for a process name in the element array, that name is deleted from the array. If overflow elements exist, they are also cleared of names that do not match, or deallocated entirely if the review indicates there is an overflow element that no longer has process names associated with it.
|