US 12,379,963 B2
Managing temporal dependencies between sets of foreign resources
Maurizio Cimadamore, Donabate (IE); and Paul David Sandoz, Campbell, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Apr. 29, 2022, as Appl. No. 17/733,287.
Prior Publication US 2023/0350716 A1, Nov. 2, 2023
Int. Cl. G06F 9/50 (2006.01); G06F 9/455 (2018.01); G06F 12/02 (2006.01)
CPC G06F 9/5016 (2013.01) [G06F 9/5022 (2013.01); G06F 9/45558 (2013.01); G06F 2009/45583 (2013.01); G06F 12/0253 (2013.01)] 17 Claims
OG exemplary drawing
 
13. A method comprising:
allocating, in a runtime environment, a segment of foreign memory to a first memory session, the runtime environment being configured to use a garbage collector to manage memory in a heap, and the foreign memory comprising off-heap memory that is not managed by the garbage collector;
opening, in the runtime environment, a second memory session that descends from the first memory session, wherein opening the second memory session that descends from the first memory session comprises:
receiving, by a function that instantiates the second memory session, a function call with a parameter comprising a first reference to the first memory session;
responsive to the function call:
instantiating the second memory session; and
storing a parent-child association between the first memory session and the second memory session; and
returning, as an output of the function that instantiates the second memory session, a second reference to the second memory session;
while the second memory session is open, encountering a first request to close the first memory session;
responsive to encountering the first request to close the first memory session, determining that the first memory session has at least one open descendant memory session; and
responsive to determining that the first memory session has at least one open descendant memory session, declining the first request to close the first memory session,
wherein the method is performed by at least one device comprising one or more hardware processors.