INCORPORATION BY REFERENCE; DISCLAIMER

This application is hereby incorporated by reference: application No. 62/931,505 filed on Nov. 6, 2019. The Applicant hereby rescinds any disclaimer of claim scope in the parent application or the prosecution history thereof and advises the USPTO that the claims in this application may be broader than any claim in the parent application.

TECHNICAL FIELD

The present disclosure relates to accessing memory. In particular, the present disclosure relates to providing and application programming interface for allowing access to elements and sub-elements of objects stored in off-heap memory.

BACKGROUND

The Java virtual machine has a heap that is a memory area shared among all Java virtual machine threads. The heap is the runtime data area from which memory for all class instances and arrays is allocated. The heap is created on virtual machine start-up. Heap storage for objects is reclaimed by an automatic storage management system (known as a garbage collector); objects are never explicitly deallocated. The heap may be of a fixed size or may be expanded as required by the computation and may be contracted if a larger heap becomes unnecessary. The memory for the heap does not need to be contiguous. A Java virtual machine implementation may provide a programmer or a user control over an initial size of the heap, as well as, if the heap can be dynamically expanded or contracted, control over the maximum and minimum heap size. A virtual machine has access to a memory area known as the heap. Java objects created by a program are assigned memory addresses within the heap. The Java virtual machine is adept at managing memory within the heap. A garbage collection process deallocates objects from the heap once those objects are no longer being referenced by programs.

Accessing foreign (i.e., off-heap) memory from a Java application can be useful for many reasons, including to avoid the cost and unpredictability associated with garbage collection, to share memory across multiple processes, and to allow memory contents to be serialized and deserialized. One way to facilitate foreign memory access is through the ByteBuffer Application Programming Interface (API).

Another common method for accessing foreign memory is through the use of the Unsafe APIs. The Unsafe APIs allow for off-heap memory allocations and reading and putting of data into off-heap memory. However, the Unsafe APIs, allow access to some unaccessible memory locations, which might cause an Operating System to kill the application.

The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.

