Fork-aware smart pointers
AssigneeJPMorgan Chase Bank, N.A.
InventorMichel VICTOR
Life of this patent
Estimating the term…
Abstract
A system for and method of allocating and deallocating memory in a multiprocessing computing environment that improves the management of memory by the various processes and sub-processes in the multiprocessing environment are disclosed. The system and method improve the allocation and deallocation of memory for sub-processes that are limited to performing memory read operations.
Claims17
A method of managing memory in a multiprocessing environment, the method comprising:
- initiating a first program process;
- allocating a first memory space to the first program process;
- initializing a first pointer;
- associating the first pointer with the first program process;
- adjusting a count value stored by the first pointer according to a number of accesses of the first memory space by the first program process;
- initiating a first sub-process with access to the first memory space without allocating a second memory space to the first sub-process;
- preventing the adjustment of the count value stored by the first pointer as the result of a memory access by the first sub-process;
- monitoring the count value stored by the first pointer to determine if the count value reaches a predetermined value;
- and
- deallocating the memory space if the count value count value stored by the first pointer reaches the predetermined value and there are no additional pointers associated with the first memory.
A system for managing memory in a multiprocessing environment, the system comprising:
- a first processor core;
- a first process operating on the first processor core;
- a first memory space in communication with the first processor core, the first memory space allocated to the first process;
- a first pointer associated with the first process;
- a first sub-process in communication with the first memory space where the first sub-process does not have a memory allocation;
- instructions that, when executed by the processor core:
- adjust a count value stored by the first pointer to reflect accesses of the first memory space by the first program process;
- prevent the adjustment of the count value stored by the first pointer as the result of a memory access by the first sub-process;
- monitor the count value to determine if the first pointer reaches a predetermined value;
- and
- deallocate the first memory space by disassociating it from the first program process if the first point reaches the predetermined value.
A system for managing memory in a multiprocessing environment, the system comprising:
- a first processor core;
- a first process operating on the first processor core;
- a first memory space in communication with the first processor core, the first memory space allocated to the first process;
- a first pointer associated with the first process and located in the first memory space;
- a first sub-process in communication with the first memory space where the first sub-process does not have a memory allocation;
- a second pointer associated with the first sub-process and located in the first memory space;
- a second sub-process with access to the first memory space where the second sub-process does not have a memory allocation;
- instructions that, when executed by the processor core:
- adjust a first count value stored by the first pointer to reflect accesses of the first memory space by the first program process;
- adjust a second count value stored by the second pointer to reflect accesses of the first memory space by the first sub-process;
- prevent the adjustment of the first count value stored by the first pointer as the result of a memory access by the first sub-process by performing the sub steps of:
- storing an identifier representing the first program process;
- identifying a program process performing a memory access upon detecting the memory access;
- comparing the stored identifier with the identity of the program process performing the memory access;
- and
- monitor the first count value to determine if the first count value reaches a value of zero;
- monitor the second count value stored by the second pointer to determine if the second count value reaches a predetermined value;
- and
- deallocate the first memory space by disassociating it from the first program process if the count values of the first pointer and second pointer reach the predetermined value;
- and
- prevent the adjustment of the first count value stored by the first pointer to reflect accesses of the first memory space as the result of a memory access by the second sub-process.
Dependencies are inferred from the claim text.