Direct memory control operations on memory data structures
Systems and methods for direct memory control operations on memory data structures. In one implementation, a processing device receives, from a component of an application runtime environment, a request to perform a memory access operation on a portion of a memory space; determines a data structure address for a portion of a memory data structure, wherein the portion of the data structure is associated with the portion of the memory space; and performs, in view of the data structure address, the memory access operation directly on the portion of the memory data structure.
1. A method comprising:
receiving, by a processing device, from a component of an application runtime environment, a first request to perform a memory access operation on a portion of a memory space;
sending, to a data structure controller component of an operating system, via an interface configured to access the data structure controller component directly, a second request for a node address of a node of a page table tree, wherein each node of the page table tree is associated with a corresponding at least one memory page of the memory space, wherein the node of the page table tree is associated with the portion of the memory space, wherein the second request comprises a virtual memory address associated with the portion of the memory space;
receiving, from the data structure controller component, the node address of the node of the page table tree; and
performing, in view of the node address, the memory access operation directly on the node of the page table tree, wherein the memory access operation is at least one of multiple memory access operations, and wherein the multiple memory access operations comprise a garbage collection operation, a memory relocation operation, a memory allocation operation, a memory protect operation, and a memory unprotect operation,
wherein the application runtime environment is a component of a unikernel.
2. The method of claim 1 , further comprising:
storing, in an additional portion of the memory space, the node address of the node of the page table tree.
3. The method of claim 2 , further comprising:
receiving, from the component of the application runtime environment, an additional request to perform an additional memory access operation on the portion of the memory space;
retrieving, from the additional portion of the memory space, the node address of the node of the page table tree; and
performing, in view of the node address, the additional memory access operation on the node of the page table tree.
4. The method of claim 1 , wherein performing the memory access operation further comprises setting an indicator for a page table entry to indicate that an associated memory page in the memory space is protected or unprotected.
5. The method of claim 1 , wherein performing the memory access operation further comprises:
accessing the page table tree directly using the node address; and
modifying a node of the page table tree located at the node address.
6. The method of claim 5 , wherein modifying the node of the page table tree comprises at least one of setting an indicator at the node address, resetting an indicator at the node address, or modifying a pointer associated with the node address.
7. The method of claim 1 , wherein the operating system is a component of the unikernel.
8. A system comprising:
a memory; and
a processing device operatively coupled to the memory, the processing device to:
receive, from a component of an application runtime environment, a first request to perform a memory access operation on a portion of a memory space;
send, to a data structure controller component of an operating system, via an interface configured to access the data structure controller component directly, a second request for a node address of a node of a page table tree, wherein each node of the page table tree is associated with a corresponding at least one memory page of the memory space, wherein the node of the page table tree is associated with the portion of the memory space, wherein the second request comprises a virtual memory address associated with the portion of the memory space;
receive, from the data structure controller component, the node address of the node of the page table tree; and
perform, in view of the node address, the memory access operation directly on the node of the page table tree,
wherein the memory access operation is at least one of multiple memory access operations, and wherein the multiple memory access operations comprise a garbage collection operation, a memory relocation operation, a memory allocation operation, a memory protect operation, and a memory unprotect operation.
9. The system of claim 8 , wherein the processing device is further to:
store, in an additional portion of the memory space, the node address of the node of the page table tree.
10. The system of claim 9 , wherein the processing device is further to:
receive, from the component of the application runtime environment, an additional request to perform an additional memory access operation on the portion of the memory space;
retrieve, from the additional portion of the memory space, the node address of the node of the page table tree; and
perform, in view of the node address, the additional memory access operation on the node of the page table tree.
11. The system of claim 8 , wherein the application runtime environment is a component of a unikernel.
12. The system of claim 8 , wherein to perform the memory access operation, the processing device further to:
access the page table tree directly using the node address; and
perform at least one of setting an indicator at the node address of the page table tree, resetting an indicator at the node address of the page table tree, or modifying a pointer associated with the node address of the page table tree.
13. The system of claim 8 , wherein the operating system is a component of a unikernel.
14. A non-transitory computer-readable media storing instructions that, when executed, cause a processing device to:
receive, from a component of an application runtime environment, a first request to perform a memory access operation on a portion of a memory space;
send, to a data structure controller component of an operating system, via an interface configured to access the data structure controller component directly, a second request for a node address of a node of a page table tree, wherein each node of the page table tree is associated with a corresponding at least one memory page of the memory space, wherein the node of the page table tree is associated with the portion of the memory space, wherein the second request comprises a virtual memory address associated with the portion of the memory space;
receive, from the data structure controller component, the node address of the node of the page table tree; and
perform, in view of the node address, the memory access operation directly on the node of the page table tree, wherein the memory access operation is at least one of multiple memory access operations, and wherein the multiple memory access operations comprise a garbage collection operation, a memory relocation operation, a memory allocation operation, a memory protect operation, and a memory unprotect operation,
wherein the application runtime environment is a component of a unikernel.
15. The non-transitory computer-readable media of claim 14 , wherein the processing device is further to:
store, in an additional portion of the memory space, the node address of the node of the page table tree.
16. The non-transitory computer-readable media of claim 15 , wherein the processing device is further to:
receive, from the component of the application runtime environment, an additional request to perform an additional memory access operation on the portion of the memory space;
retrieve, from the additional portion of the memory space, the node address of the node of the page table tree; and
perform, in view of the node address, the additional memory access operation on the node of the page table tree.
17. The non-transitory computer-readable media of claim 14 , wherein to perform the memory access operation, the processing device further to:
access the page table tree directly using the node address; and
perform at least one of setting an indicator at the node address of the page table tree, resetting an indicator at the node address of the page table tree, or modifying a pointer associated with the node address of the page table tree.
18. The non-transitory computer-readable media of claim 14 , wherein the operating system is a component of the unikernel.