Back to results
US 10,896,062 B2Granted
Inter-process memory management
AssigneeSap SE
InventorsIvan Schreter, Daniel Booss
Life of this patent
Estimating the term…
Abstract
A memory allocator assigns temporary memory limits to each of a plurality of processes requiring memory. Thereafter, at least one assigned temporary memory limit is changed during execution of a corresponding process. Related apparatus, systems, techniques and articles are also described.
Claims9
A method comprising:
- assigning, by a memory allocator, a temporary memory limit to each of a plurality of processes requiring memory in a shared memory, the assigning of the temporary memory limit being based on a vector in the shared memory, the vector comprising a plurality of slots, each slot storing, for a corresponding one of the plurality of processes, a unique identifier for the corresponding one of the plurality of processes, a quantity of bytes allocated to the corresponding one of the plurality of processes, and the temporary memory limit for memory consumption by the corresponding one of the plurality of processes, wherein a sum of each of the temporary memory limits stored in the vector cannot exceed a global memory limit representative of a maximum amount of shared memory to be consumed by the plurality of processes;
- receiving a memory request of a first process of the plurality of processes;
- determining, based on the vector, that the first process has exceeded a first temporary memory limit and/or that increasing the first temporary memory limit would exceed the global memory limit;
- signaling, in response to the determining, a second process of the plurality of processes to reduce a second temporary memory limit of the second process;
- reducing, during execution of the second process of the plurality of processes and based on the determining, the second temporary memory limit corresponding to the second process being executed, the second process releasing an amount of memory to the shared memory in response to the reducing and storing the released memory in a process-local cache, the amount of memory released proportional to the overall usage of the second temporary memory limit of the second process;
- signaling, in response to reducing the second temporary memory limit of the second process, the first process to allocate memory from the shared memory, wherein the first process is assigned an increased first temporary memory limit;
- receiving a second memory request of the first process of the plurality of processes;
- determining that the first process has exceeded the increased first temporary memory limit and that an allocation of bytes to the first process will exceed the global memory limit;
- and
- activating, in response to determining that the first process has exceeded the increased first temporary memory limit and that the allocation of bytes to the first process will exceed the global memory limit, a global lock during which the temporary memory limit to each of the plurality of processes is changed.
7 more elements
A system comprising:
- at least one data processor;
- at least one memory coupled to the at least one data processor, the at least one memory storing instructions, which when executed, cause the at least one data processor to perform operations comprising:
- assigning, by a memory allocator, a temporary memory limit to each of a plurality of processes requiring memory in a shared memory, the assigning of the temporary memory limit being based on a vector in the shared memory, the vector comprising a plurality of slots, each slot storing, for a corresponding one of the plurality of processes, a unique identifier for the corresponding one of the plurality of processes, a quantity of bytes allocated to the corresponding one of the plurality of processes, and the temporary memory limit for memory consumption by the corresponding one of the plurality of processes, wherein a sum of each of the temporary memory limits stored in the vector cannot exceed a global memory limit representative of a maximum amount of shared memory to be consumed by the plurality of processes;
- receiving a memory request of a first process of the plurality of processes;
- determining, based on the vector, that the first process has exceeded a first temporary memory limit and/or that increasing the first temporary memory limit would exceed the global memory limit;
- signaling, in response to the determining, a second process of the plurality of processes to reduce a second temporary memory limit of the second process;
- reducing, during execution of the second process of the plurality of processes and based on the determining, the second temporary memory limit corresponding to the second process being executed, the second process releasing an amount of memory to the shared memory in response to the reducing and storing the released memory in a process-local cache, the amount of memory released proportional to the overall usage of the second temporary memory limit of the second process;
- and
- signaling, in response to reducing the second temporary memory limit of the second process, the first process to allocate memory from the shared memory, wherein the first process is assigned an increased first temporary memory limit;
- receiving a second memory request of the first process of the plurality of processes;
- determining that the first process has exceeded the increased first temporary memory limit and that an allocation of bytes to the first process will exceed the global memory limit;
- and
- activating, in response to determining that the first process has exceeded the increased first temporary memory limit and that the allocation of bytes to the first process will exceed the global memory limit, a global lock during which the temporary memory limit to each of the plurality of processes is changed.
10 more elements
A non-transitory computer program product storing instructions which, when executed by at least one data processor forming part of at least one computing system, result in operations comprising:
- assigning, by a memory allocator, a temporary memory limit to each of a plurality of processes requiring memory in a shared memory, the assigning of the temporary memory limit being based on a vector in the shared memory, the vector comprising a plurality of slots, each slot storing, for a corresponding one of the plurality of processes, a unique identifier for the corresponding one of the plurality of processes, a quantity of bytes allocated to the corresponding one of the plurality of processes, and the temporary memory limit for memory consumption by the corresponding one of the plurality of processes, wherein a sum of each of the temporary memory limits stored in the vector cannot exceed a global memory limit representative of a maximum amount of shared memory to be consumed by the plurality of processes;
- receiving a memory request of a first process of the plurality of processes;
- determining, based on the vector, that the first process has exceeded a first temporary memory limit and/or that increasing the first temporary memory limit would exceed the global memory limit;
- signaling, in response to the determining, a second process of the plurality of processes to reduce a second temporary memory limit of the second process;
- reducing, during execution of the second process of the plurality of processes and based on the determining, the second temporary memory limit corresponding to the second process being executed, the second process releasing an amount of memory to the shared memory in response to the reducing and storing the released memory in a process-local cache, the amount of memory released proportional to the overall usage of the second temporary memory limit of the second process;
- signaling, in response to reducing the second temporary memory limit of the second process, the first process to allocate memory from the shared memory, the allocated memory including at least a portion of the released amount of memory of the second process, wherein the first process is assigned an increased first temporary memory limit;
- receiving a second memory request of the first process of the plurality of processes;
- determining that the first process has exceeded the increased first temporary memory limit and that an allocation of bytes to the first process will exceed the global memory limit;
- and
- activating, in response to determining that the first process has exceeded the increased first temporary memory limit and that the allocation of bytes to the first process will exceed the global memory limit, a global lock during which the temporary memory limit to each of the plurality of processes is changed.
7 more elements
Dependencies are inferred from the claim text.