Object descriptors
First Claim
1. A method comprising:
- identifying, by a first operating system process in a computer system accessing a shared memory heap, a first object at a first memory address in the shared memory heap, wherein the first object was previously allocated in the shared memory heap by a second operating system process in the computer system different from the first operating system process and the first object is of a type not known to the first operating system process;
identifying, based on the first memory address, an object descriptor associated with the first object at a second memory address in the shared memory heap, wherein the object descriptor occupies a number of bits of memory independent of the type;
determining a size of the first object based on the object descriptor;
enumerating, based on the object descriptor, fields associated with the first object; and
performing an action based on each field of the enumerated fields.
1 Assignment
0 Petitions
Accused Products
Abstract
In one example in accordance with the present disclosure, a method may include identifying, by a first operating system process in a computer system accessing a shared memory heap, a first object at a first memory address in the shared memory heap. The first object may have been previously allocated in the shared memory heap by a second operating system process. The method may also include identifying an object descriptor associated with the first object at a second memory address in the shared memory heap. The object descriptor occupies a number of bits of memory independent of the type. The method may also include determining a size of the first object based on the object descriptor, enumerating, based on the object descriptor, fields associated with the first object and performing an action based on each field of the enumerated fields.
-
Citations
15 Claims
-
1. A method comprising:
-
identifying, by a first operating system process in a computer system accessing a shared memory heap, a first object at a first memory address in the shared memory heap, wherein the first object was previously allocated in the shared memory heap by a second operating system process in the computer system different from the first operating system process and the first object is of a type not known to the first operating system process; identifying, based on the first memory address, an object descriptor associated with the first object at a second memory address in the shared memory heap, wherein the object descriptor occupies a number of bits of memory independent of the type; determining a size of the first object based on the object descriptor; enumerating, based on the object descriptor, fields associated with the first object; and performing an action based on each field of the enumerated fields. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A system comprising:
-
an allocation request receiver to receive a request to allocate an instance of an object type on a shared heap accessed by a process, wherein the object type is unknown to the process; an object descriptor obtainer to obtain an object descriptor associated with the object type; an allocator to allocate the instance in a region of memory in the shared heap and insert the object descriptor in the region of memory; an object descriptor format selector to select a format for the object descriptor; and an object descriptor creator to create an object descriptor according to the selected format, wherein the object descriptor contains sufficient information to allow the process to determine a size of the instance and to enumerate fields associated with the instance, wherein each enumerated field refers to an object in the shared memory.
-
-
15. A non-transitory machine-readable storage medium encoded with instructions, the instructions executable by a hardware processor of a system to cause the system to:
-
identify by a first operating system process in a computer system accessing a shared memory heap, a first object at a first memory address in the shared memory heap, wherein the first object was previously allocated in the shared memory heap by a second operating system process in the computer system different from the first operating system process and the first object is of a type not known to the first operating system process; identify, based on the first memory address, an object descriptor associated with the first object at a second memory address in the shared memory heap, wherein the object descriptor occupies a number of bits of memory independent of the type; determine a size of the first object based on the object descriptor; enumerate, based on the object descriptor, fields associated with the first object; determine, based on the size and the enumerated fields, that a region of memory within the shared heap does not contain any reachable objects; and provide the region of memory to an allocator.
-
Specification