CN116560878B - Memory sharing method and related device - Google Patents

Memory sharing method and related device Download PDF

Info

Publication number
CN116560878B
CN116560878B CN202310831321.5A CN202310831321A CN116560878B CN 116560878 B CN116560878 B CN 116560878B CN 202310831321 A CN202310831321 A CN 202310831321A CN 116560878 B CN116560878 B CN 116560878B
Authority
CN
China
Prior art keywords
shared
data
memory
identifier
memory space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310831321.5A
Other languages
Chinese (zh)
Other versions
CN116560878A (en
Inventor
张宇昂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310831321.5A priority Critical patent/CN116560878B/en
Publication of CN116560878A publication Critical patent/CN116560878A/en
Application granted granted Critical
Publication of CN116560878B publication Critical patent/CN116560878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The application discloses a memory sharing method and a related device, in an operating environment based on a first programming language, an executable file based on a second programming language can be loaded through a programming interface, the second programming language is a lower-layer programming language compared with the first programming language, a corresponding shared memory space can be determined for a target memory identifier through the executable file based on the second programming language, data to be shared in a memory of the operating environment are copied to the shared memory space, and as the shared memory space is used for being accessed by a plurality of processes in the operating environment, the processes can share the data by accessing the same data in the shared memory space, so that the data transmission efficiency among the processes is improved, and the application performance is improved. In addition, the target memory identifier and the memory area information of the shared memory space can be stored in the global variable, and the access of a plurality of processes to the data in the shared memory space is not affected even if the executable file is executed.

Description

Memory sharing method and related device
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a memory sharing method and related device.
Background
The front-end developer can develop the server application in the running environment based on the programming language, for example, node. Js is a JavaScript running environment based on the Chrome V8 engine, and can be used for developing a high-performance and scalable network application program, and the programming language can be the JavaScript language. However, there are scenarios in the running environment where a large amount of transferred data is required, and application performance is low.
Disclosure of Invention
In order to solve the technical problems, the application provides a memory sharing method and a related device, wherein in an operating environment based on a first programming language, an executable file based on a second programming language can be loaded through a programming interface, so that memory sharing is realized by using the second programming language, inter-process communication efficiency is improved, and application performance is improved.
The embodiment of the application discloses the following technical scheme:
in one aspect, the present application provides a memory sharing method, where the method includes:
loading, through a programming interface, an executable file based on a second programming language in a first programming language-based operating environment, the second programming language being a lower-level programming language than the first programming language;
Determining a corresponding shared memory space for a target memory identifier through the executable file, copying data to be shared in the memory of the operating environment to the shared memory space, and storing the target memory identifier and memory area information of the shared memory space to a global variable; the shared memory space is used for being accessed by a plurality of processes in the running environment.
In another aspect, the present application provides a memory sharing device, where the device includes:
a file loading unit, configured to load, in an operating environment based on a first programming language, an executable file based on a second programming language through a programming interface, where the second programming language is a lower-level programming language than the first programming language;
the memory determining unit is used for determining a corresponding shared memory space for the target memory identifier through the executable file; the shared memory space is used for being accessed by a plurality of processes in the running environment;
the data copying unit is used for copying the data to be shared in the memory of the running environment to the shared memory space;
and the memory information storage unit is used for storing the target memory identifier and the memory area information of the shared memory space into a global variable.
Optionally, the data replication unit includes:
a data information acquisition unit, configured to acquire a byte start address of the data to be shared in a stack in a memory of the operating environment, and a byte length of the data to be shared;
and the copying subunit is used for copying the data to be shared into the shared memory space according to the byte starting address and the byte length.
Optionally, if the data type of the data to be shared is a reference type, the data information obtaining unit includes:
a byte length obtaining unit, configured to determine a byte length of data to be shared in a heap in a memory of the operating environment;
the space allocation unit is used for allocating an intermediate storage space for the data to be shared in a stack in a memory in the running environment according to the byte length and acquiring a character string pointer of the intermediate storage space;
the writing unit is used for writing the data to be shared into the intermediate storage space;
and the starting address determining unit is used for determining the byte starting address of the data to be shared in the intermediate storage space by utilizing the character string pointer of the intermediate storage space.
Optionally, the byte length obtaining unit is specifically configured to:
and determining the byte length of the data to be shared according to the byte length of each attribute value of the data to be shared in the heap in the memory of the running environment.
Optionally, the replicon unit is specifically configured to:
and according to the byte starting address and the byte length, copying each bit in the data to be shared into the shared memory space in sequence by utilizing the character string pointer in the stack and the character string pointer in the shared memory space.
Optionally, the apparatus further includes:
the data reading unit is used for acquiring the data to be read in the shared memory space;
the format reduction unit is used for carrying out format reduction on the data to be read to obtain the data to be processed with the reference type if the original data type of the data to be read is the reference type, wherein the reference type is an object type or a function type; if the original data type of the data to be read is a basic type, the data to be read is subjected to format reduction to obtain the data to be processed with the basic type, wherein the basic type is a digital type or a character string type.
Optionally, the apparatus further includes:
and the memory information deleting unit is used for deleting the target memory information in the global variable through the executable file, wherein the target memory information comprises a to-be-deleted identifier in the target memory identifier and memory area information of a shared memory space corresponding to the to-be-deleted identifier so as to release the shared memory space corresponding to the to-be-deleted identifier.
Optionally, the memory determining unit is specifically configured to:
creating an initial shared memory space, and determining a shared memory space corresponding to the target memory identifier from the initial shared memory space; or alternatively, the first and second heat exchangers may be,
and creating a corresponding shared memory space for the target memory identifier.
Optionally, the memory determining unit is specifically configured to:
if the target memory identifier does not exist, determining a corresponding shared memory space for the target memory identifier;
if the target memory identifier exists, acquiring a shared memory space corresponding to the target memory identifier or updating the corresponding shared memory space for the target memory identifier.
Optionally, the memory determining unit is specifically configured to:
creating a file corresponding to a target memory identifier in a storage space, wherein the position of the file is used as a shared memory space corresponding to the target memory identifier.
Optionally, the plurality of processes are used for at least one of image processing, audio and video encoding and decoding, and network communication.
In another aspect, the present application provides a computer device comprising a processor and a memory:
the memory is used for storing a computer program and transmitting the computer program to the processor;
the processor is configured to execute the memory sharing method according to the above aspect according to instructions in the computer program.
In another aspect, embodiments of the present application provide a computer readable storage medium, where the computer readable storage medium is configured to store a computer program, where the computer program is configured to perform the memory sharing method described in the foregoing aspect.
In another aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run on a computer device, causes the computer device to perform the memory sharing method.
According to the technical scheme, in the running environment based on the first programming language, the executable file based on the second programming language is loaded through the programming interface, the second programming language is a lower-layer programming language compared with the first programming language, the corresponding shared memory space can be determined for the target memory mark through the executable file based on the second programming language, the data to be shared in the memory of the running environment is copied to the shared memory space, and as the shared memory space is used for being accessed by a plurality of processes in the running environment, the processes can share the data by accessing the same data in the shared memory space, so that the data transmission efficiency among the processes is improved, and the application performance is improved. In addition, the target memory identifier and the memory area information of the shared memory space can be stored in the global variable, so that even if the executable file is executed, the target memory identifier and the memory area information of the shared memory space are reserved, the shared memory space cannot be released, and the stored data cannot be deleted, and therefore the access of a plurality of processes to the data in the shared memory space cannot be influenced even if the executable file is executed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a memory sharing method provided in an embodiment of the present application;
FIG. 2 is a flowchart of a memory sharing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a process for creating a shared memory space by a Rust program according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another memory sharing method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a byte start address acquisition manner by a Rust program according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process of data replication by a Rust program according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another memory sharing method according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a process for acquiring a byte length of data to be shared by a Rust program according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a process of acquiring a byte start address of data to be shared in a stack by a Rust program according to an embodiment of the present application;
FIG. 10 is a schematic diagram of another process of data replication by Rust program according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a process for creating global variables by a Rust program according to an embodiment of the present application;
fig. 12 is a schematic diagram of a process of storing memory area information by a Rust program according to an embodiment of the present application;
fig. 13 is a schematic diagram of a format restoring process according to a Rust procedure according to an embodiment of the present application;
fig. 14 is a schematic diagram of a process of releasing memory by a Rust procedure according to an embodiment of the present application;
fig. 15 is a block diagram of a memory sharing device according to an embodiment of the present application;
fig. 16 is a block diagram of a terminal device according to an embodiment of the present application;
fig. 17 is a block diagram of a server according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
At present, a front-end developer can develop a server application in an operation environment based on a programming language, however, a scene of needing a large amount of data transmission exists in the operation environment, and the application performance is low.
In order to solve the technical problems, the application provides a memory sharing method and a related device, wherein in an operating environment based on a first programming language, an executable file based on a second programming language can be loaded through a programming interface, so that memory sharing is realized by using the second programming language, inter-process communication efficiency is improved, and application performance is improved.
The memory sharing method provided by the embodiment of the application can be implemented through computer equipment, and the computer equipment can be terminal equipment or a server, wherein the server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server for providing cloud computing service. Terminal devices include, but are not limited to, cell phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle terminals, aircraft, and the like. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
In order to facilitate understanding of the technical solution provided in the present application, a method for sharing a memory provided in the embodiments of the present application will be described next with reference to an actual application scenario.
Fig. 1 is a schematic diagram of an application scenario of a memory sharing method according to an embodiment of the present application, where the scenario includes a server 10, and the server 10 may be used as the aforementioned computer device to implement memory sharing in an operating environment based on a first programming language.
In an operating environment based on a first programming language, the server 10 can load an executable file based on a second programming language through a programming interface, the second programming language is a lower-layer programming language than the first programming language, a corresponding shared memory space can be determined for a target memory identifier through the executable file based on the second programming language, data to be shared in a memory of the operating environment is copied to the shared memory space, and because the shared memory space is used for being accessed by a plurality of processes in the operating environment, the processes can share the data by accessing the same data in the shared memory space, so that the data transmission efficiency among the processes is improved, and the application performance is improved.
In addition, the server 10 may store the target memory identifier and the memory area information of the shared memory space in the global variable, so that the target memory identifier and the memory area information of the shared memory space are reserved even if the executable file is executed, the shared memory space is not released, and the stored data is not deleted, so that the access of the processes to the data in the shared memory space is not affected even if the executable file is executed.
Fig. 2 is a flowchart of a memory sharing method provided in the embodiment of the present application, where in this embodiment, a server is used as the computer device to describe the memory sharing method, the memory sharing method may include:
s101, loading an executable file based on a second programming language through a programming interface in a running environment based on a first programming language.
The front-end developer can develop the server application in the running environment based on the programming language, for example, node. Js is a JavaScript running environment based on the Chrome V8 engine, and can be used for developing a high-performance and scalable network application program, and the programming language can be the JavaScript language. The application may be run by a computer device and may include a PC client program, a mobile client program, a daemon program, etc. The computer device allocates computing resources for the applications to execute application-related data processing logic, the computing resources may include processes, each process may include a plurality of threads, and each thread may be configured to execute corresponding data processing logic. The computer device may also allocate memory space for the application, which may include a heap allocated for the application for storing data during the running of the application and a stack allocated for the thread for storing parameters, local variables, etc. of the functions performed by the thread.
However, in an operating environment, there is a scenario where a large amount of data needs to be transferred, for example, an application including a plurality of processes is used for at least one of image processing, audio/video encoding/decoding, or network communication, and a corresponding plurality of processes is used for at least one of image processing, audio/video encoding/decoding, or network communication, different processes may implement different functions, and the processes cooperatively perform data processing, so that a large amount of data transmission between the processes is required. For example, each process transmits independent results to the main process in the form of message communication, and the main process returns final results to realize the functions of image processing, audio/video encoding/decoding or network communication.
The shared memory is a mode of inter-process communication (Inter Process Communication, IPC) and allows multiple processes to share the same memory area, so that the multiple processes can access the same shared memory block to access the same piece of data, sharing and transferring the data are realized, and communication overhead between different processes is saved. However, the programming language (e.g., node. Js) in the operating environment is an upper layer application language, which has low controllability on hardware and lacks the capability of directly operating the system memory, so that the built operating environment cannot realize memory sharing, and data transmission is performed between each process in a form of message communication, which is not beneficial to improving application performance. For example, a child process transfers data to a parent process after serializing, the parent process performs deserialization, there is a large overhead, and data that cannot be serialized cannot realize inter-process communication.
In the embodiment of the application, in the running environment based on the first programming language, the executable file based on the second programming language can be loaded through the programming interface, and the memory sharing is realized by the codes indicated by the executable file based on the second programming language, so that the memory sharing can be realized in the running environment of the first programming language, the communication expenditure among different processes is saved, and the application performance is improved. The code is written more naturally in a multi-process architecture in an operation environment based on the first programming language, data are not required to be transmitted mutually through process communication, and the convenience of code writing is improved as if all codes are operated in the same memory space on code writing.
The memory sharing can be realized by the executable file based on the second programming language, the second programming language is a lower programming language than the first programming language, the controllability of the second programming language to hardware is higher, so that the overall application function and the controllability of the second programming language to hardware can be considered by combining the first programming language and the second programming language, and the executable file can be obtained by compiling the program based on the second programming language by the programming interface, so that the executable file can be executed in the running environment based on the first programming Yuan.
For example, the first programming language may be node.js, the second programming language may be Rust, rust is a system level programming language developed by Mozilla corporation, and its design goal is to provide a secure, concurrent, efficient programming language, the programming interface may be an application editing interface (Application Programming Interface, API), and in particular may be an N-API (node.js API), which is a set of APIs for writing node.js c++ extensions, that provides a stable, cross-version programming interface such that c++ extensions can be run on different versions of node.js without recompilation, and that is easier to develop, maintain, and distribute. Thus, the operation of memory sharing among different processes can be realized through Rust language programming, and Rust language codes are compiled into executable files which can be called in a node.js environment by means of N-API, so that the capacity of sharing the same memory under the code architecture of multiple processes can be realized in the node.js environment.
S102, determining a corresponding shared memory space for the target memory identifier through the executable file.
In the embodiment of the application, the corresponding shared memory space can be determined for the target memory identifier through the executable file, the target memory identifier is used for uniquely indicating the shared memory space, and the shared memory space can be accessed by a plurality of processes in the running environment, so that data sharing among the plurality of processes is realized. The executable file is compiled from a second programming language based program, such as a Rust program.
The memory identifier may be expressed as a mem_id, where the memory identifier may include one or more memory identifiers used to indicate different shared memory spaces, and after the memory identifier is input with a value, the value is used as a target memory identifier, for example, mem_id is a memory.
Before determining the corresponding shared memory space for the target memory identifier, whether the target memory identifier exists or not may be determined, if yes, the shared memory space corresponding to the existing target memory identifier may be utilized, and when the shared memory space is utilized, memory data in the shared memory space will be covered by new memory data, or the corresponding shared memory space is redetermined for the target memory identifier. The shared memory space corresponding to the target memory identifier can be obtained as the shared memory space determined for the target memory identifier, or the corresponding shared memory space is updated for the target memory identifier after the shared memory space is reallocated for the target memory identifier. If the target memory identifier does not exist, a corresponding shared memory space can be determined for the target memory identifier. Therefore, the shared memory space can be effectively managed, and the space utilization rate is improved.
The method for determining the corresponding shared memory space for the target memory identifier may specifically be to create (create) an initial shared memory space, determine the shared memory space corresponding to the target memory identifier from the initial shared memory space, and allocate the corresponding shared memory space for the target memory identifier from the created initial shared memory space. Alternatively, a corresponding shared memory space may be created for the target memory identification. The determination mode of the shared memory space can be determined according to actual conditions, and the utilization rate of the memory space is improved.
The creation of the shared memory space or the initial shared memory space can be realized by a shared memory (SHmem) module in the Rust ecology, and the created shared memory space or the shared memory area in which the initial shared memory space is empty can be used for storing the data to be shared. Referring to fig. 3, a schematic process diagram of creating a shared memory space by a Rust program in this embodiment of the present application is shown, where when the shared memory space is created, a target memory identifier (mem_id) corresponding to the shared memory space, a size (size) of the shared memory space, and the like may be defined.
In the process of determining the corresponding shared memory space for the target memory identifier, a file corresponding to the target memory identifier may be created in the storage space, where the location of the file is used as the shared memory space corresponding to the target memory identifier, for example, the file corresponding to the target memory identifier may be used as a file name, for example, when the mem_id is memory.
S103, copying the data to be shared in the memory of the operating environment to the shared memory space.
After determining the shared memory space for the target memory identifier, the data to be shared may be copied (copy) into the shared memory space, where the copying of the data to be shared is implemented by an executable file. The data to be shared can be defined by a developer or according to a preset rule, so that the data to be shared in the shared memory space can be accessed by a plurality of processes, and memory sharing and data sharing among different processes are realized.
The shared memory space can store one data to be shared, can store a plurality of data to be shared, or can store the data to be shared corresponding to the target memory identifier into the shared memory space corresponding to the target memory identifier according to the association relation between the target memory identifier and the data to be shared. Because the shared memory space is used for being accessed by a plurality of processes in the running environment, the processes can share the data by accessing the same data in the shared memory space, so that the data transmission efficiency among the processes is improved, and the application performance is improved.
Referring to fig. 4, a flow chart of another memory sharing method in this embodiment of the present application is shown, where data to be shared may be stored in a memory of an operating environment, the data to be shared in the memory of the operating environment is copied to a shared memory space, and may specifically be S1031, a byte start address of the data to be shared in a stack of the memory of the operating environment and a byte length of the data to be shared are obtained, and S1032 copies the data to be shared to the shared memory space according to the byte start address and the byte length, so that the data to be shared in a non-shared stack may be copied to the sharable shared memory space, thereby realizing sharing of the data to be shared among multiple processes.
In actual operation, when the running environment is a node. Js environment, the data types of the data to be shared may include a basic type and a reference type. The same shared memory space can store data with the same data type, and can also store data with different data types.
The basic types include a number type and a character string type, and the data to be shared of the basic types is usually stored in a stack in the memory, so that the data to be shared of the basic types can be copied into the shared memory space in the manner described above. In the process of copying the data to be shared into the shared memory space, S1032 may specifically copy each bit in the data to be shared into the shared memory space in sequence by using the string pointer in the stack and the string pointer in the shared memory space according to the byte starting address and the byte length, specifically copy the character pointed by the string pointer in the stack into the memory location pointed by the string pointer in the shared memory space by using the memory copying capability provided by the Rust programming language, where the copied data to be shared exists in binary form.
Referring to fig. 5, a schematic diagram of a byte start address obtaining manner by a Rust program in the embodiment of the present application is shown, where basic type data may be converted into a target format, so as to obtain a byte start address of data to be shared in a stack, where the target format may be a uint8 (u 8) format. Referring to fig. 6, a schematic diagram of a process of data copying by a Rust program in the embodiment of the present application is shown, where a string pointer in a stack may be denoted as js string pointer, a string pointer in a shared memory space may be denoted as ptr string pointer, and in the process of data copying, a character pointed by the js string pointer may be copied to a shared memory location pointed by ptr.
The reference type may include a function type and an object type, the data to be shared of the object type may include a plurality of attributes, the data to be shared of the data type is usually stored in a heap in the memory, and is difficult to copy directly from the heap to the shared memory space, so that the data to be shared may be copied from the heap to the stack and then copied from the stack to the shared memory space, where the stack storing the data to be shared may be denoted as an intermediate storage space. The byte length of the data to be shared and its byte start address in the stack may be obtained before copying the data to be shared from the stack to the shared memory space.
Specifically, referring to fig. 7, a flow chart of another memory sharing method in this embodiment of the present application is shown, S1031 may be specifically that S1031A determines a byte length of data to be shared in a heap in a memory of an operating environment, S1031B allocates an intermediate storage space for the data to be shared in the heap in the memory of the operating environment according to the byte length, and obtains a string pointer of the intermediate storage space, S1031C writes the data to be shared into the intermediate storage space, S1031D determines a byte start address of the data to be shared in the intermediate storage space by using the string pointer of the intermediate storage space. The byte starting address of the data to be shared in the intermediate storage space is the byte starting address of the data to be shared in the stack of the memory of the operating environment, and then the data to be shared is copied to the shared memory space according to the byte starting address and the byte length. The intermediate storage space distributed according to the byte length can adapt to the size of the data to be shared, and the utilization efficiency of the storage space is improved. The byte starting address can be acquired in an auxiliary mode through the character string pointer of the intermediate storage space, and copying of data to be shared is assisted, so that sharing of the data to be shared, the data type of which is a reference type, is achieved.
Therefore, the data to be shared with the data type as the reference type can be stored in the shared memory space, the inter-process sharing of the data with the reference type is realized, the limitation that the data which can be serialized can only be transmitted through a message communication mode among processes in the traditional scheme is overcome, the data with the reference type which can not be serialized can be shared among all processes through the shared memory mode, and a child process can directly access any data in the memory of a parent process, so that services supported by the data with the reference type in the parent process can be accessed, and the limitation that the data transmission among the processes can be realized only through serialization is overcome.
Since the data type of the data to be shared may include a plurality of attributes when the data type of the data to be shared is a reference type, the byte length of the data to be shared in the heap in the memory of the operating environment may be determined according to the byte length of each attribute value of the data to be shared in the heap in the memory of the operating environment, for example, the byte length of the data to be shared may be the sum of the byte lengths of each attribute value. When the data type of the data to be shared is an object type, which can be expressed as jsObject, the actual byte length of the data to be shared in the heap can be dynamically acquired through a layout interface (layout api) of Rust.
In the process of copying the data to be shared into the shared memory space, S1032 may specifically copy each bit in the data to be shared into the shared memory space in turn by using the string pointer in the stack (i.e. the intermediate memory space) and the string pointer in the shared memory space according to the byte start address and the byte length, specifically copy the character pointed by the string pointer in the stack into the memory location pointed by the string pointer in the shared memory space by using the memory copying capability provided by the Rust programming language, where the copied data to be shared exists in binary form.
Referring to fig. 8, a schematic process of obtaining the byte length of the data to be shared by the Rust program in the embodiment of the present application is shown, where the actual byte length of the jsObject may be obtained by the layout method of the Rust program. Referring to fig. 9, a schematic process diagram of obtaining a byte start address of data to be shared in a stack by a Rust program in this embodiment of the present application is shown, specifically, an intermediate storage space may be allocated for the data to be shared, a string pointer of the intermediate storage space may be obtained, after the data to be shared is copied into the intermediate storage space, the byte start address of the data to be shared in the stack is obtained by means of the string pointer, so as to copy the data to be shared according to the byte start address and the byte length. Referring to fig. 10, another process diagram of data copying by the Rust program in this embodiment of the present application is shown, where a string pointer in the intermediate storage space may be denoted as a js string pointer, a string pointer in the shared memory space may be denoted as a ptr string pointer, and in the process of data copying, a character pointed by the js string pointer may be copied to the shared memory location pointed by ptr.
S104, storing the target memory identification and the memory area information of the shared memory space into the global variable.
In the embodiment of the present application, the target memory identifier and the memory area information of the shared memory space may also be stored in the global variable, and the storage of the target memory identifier and the memory area information of the shared memory space may be implemented by using an executable file, so that even if the executable file is executed, the target memory identifier and the memory area information of the shared memory space are also reserved, the shared memory space is not released by the system, and the data to be shared in the shared memory space is not deleted, so that access of multiple processes to the shared memory space is not affected even if the executable file is executed. Of course, the target memory identifier and the memory area information of the shared memory space may also be stored in the global variable after the shared memory space is created, so as to reserve the shared memory space for subsequent use.
Specifically, a global variable in the Rust memory can be created in advance for storing the memory area information, the type of the global variable can be a hash table (HashMap), the key (key) is a string type, the key is a memory identifier, the value is the memory area information of the shared memory space corresponding to the memory identifier, key value pairs between the target memory identifier and the memory area information of the shared memory space can be stored through the global variable, and each key value pair is used for maintaining a piece of shared memory space. Referring to fig. 11, a process diagram of creating a global variable by a Rust program in an embodiment of the present application is shown, where the global variable is initialized for subsequent use when the global variable is created. Referring to fig. 12, a process diagram of storing memory area information by a Rust program in an embodiment of the present application is shown, where a target memory identifier and memory area information of a shared memory space are inserted (inserted) into a global variable.
In this embodiment of the present invention, data stored in a shared memory space is stored in a binary form, so after data to be read in the shared memory space is acquired, format reduction may be performed on the data to be read to obtain data to be processed of an original data type, specifically, if the original data type of the data to be read is a reference type, format reduction may be performed on the data to be read to obtain data to be processed having an application type, and if the original data type of the data to be read is a basic type, format reduction may be performed on the data to be read to obtain data to be processed having a basic type. The format restoration of the data to be read may be achieved by an executable file. Referring to FIG. 13, a schematic diagram of a format reduction process by a Rust program in an embodiment of the present application is shown, where the data to be read may be reduced to the data to be processed in the character string type by str:from_utf8.
In this embodiment of the present application, the target memory information in the global variable may also be deleted by executing the file, where the target memory information includes a to-be-deleted identifier in the target memory identifier and memory area information of the shared memory space corresponding to the to-be-deleted identifier, so as to release the shared memory space corresponding to the to-be-deleted identifier, and implement control over the shared memory space. Referring to fig. 14, a schematic process diagram of a memory release by a Rust program in an embodiment of the present application is shown, where Rust provides a clear method for deleting a to-be-deleted identifier and memory area information of a shared memory space corresponding to the to-be-deleted identifier, so that the shared memory space is released, and stored data is deleted.
Based on the memory sharing method provided by the embodiment of the present application, the embodiment of the present application further provides a memory sharing device, and referring to fig. 15, which is a block diagram of a memory sharing device provided by the embodiment of the present application, the memory sharing device 1300 includes:
a file loading unit 1301 configured to load, in a running environment based on a first programming language, an executable file based on a second programming language through a programming interface, where the second programming language is a lower-level programming language than the first programming language;
a memory determining unit 1302, configured to determine, for the target memory identifier, a corresponding shared memory space through the executable file; the shared memory space is used for being accessed by a plurality of processes in the running environment;
a data copying unit 1303, configured to copy data to be shared in the memory of the operating environment to the shared memory space;
the memory information storage unit 1304 is configured to store the target memory identifier and the memory area information of the shared memory space in a global variable.
Optionally, the data replication unit 1303 includes:
a data information acquisition unit, configured to acquire a byte start address of the data to be shared in a stack in a memory of the operating environment, and a byte length of the data to be shared;
And the copying subunit is used for copying the data to be shared into the shared memory space according to the byte starting address and the byte length.
Optionally, if the data type of the data to be shared is a reference type, the data information obtaining unit includes:
a byte length obtaining unit, configured to determine a byte length of data to be shared in a heap in a memory of the operating environment;
the space allocation unit is used for allocating an intermediate storage space for the data to be shared in a stack in a memory in the running environment according to the byte length and acquiring a character string pointer of the intermediate storage space;
the writing unit is used for writing the data to be shared into the intermediate storage space;
and the starting address determining unit is used for determining the byte starting address of the data to be shared in the intermediate storage space by utilizing the character string pointer of the intermediate storage space.
Optionally, the byte length obtaining unit is specifically configured to:
and determining the byte length of the data to be shared according to the byte length of each attribute value of the data to be shared in the heap in the memory of the running environment.
Optionally, the replicon unit is specifically configured to:
And according to the byte starting address and the byte length, copying each bit in the data to be shared into the shared memory space in sequence by utilizing the character string pointer in the stack and the character string pointer in the shared memory space.
Optionally, the apparatus further includes:
the data reading unit is used for acquiring the data to be read in the shared memory space;
the format reduction unit is used for carrying out format reduction on the data to be read to obtain the data to be processed with the reference type if the original data type of the data to be read is the reference type, wherein the reference type is an object type or a function type; if the original data type of the data to be read is a basic type, the data to be read is subjected to format reduction to obtain the data to be processed with the basic type, wherein the basic type is a digital type or a character string type.
Optionally, the apparatus further includes:
and the memory information deleting unit is used for deleting the target memory information in the global variable through the executable file, wherein the target memory information comprises a to-be-deleted identifier in the target memory identifier and memory area information of a shared memory space corresponding to the to-be-deleted identifier so as to release the shared memory space corresponding to the to-be-deleted identifier.
Optionally, the memory determining unit 1302 is specifically configured to:
creating an initial shared memory space, and determining a shared memory space corresponding to the target memory identifier from the initial shared memory space; or alternatively, the first and second heat exchangers may be,
and creating a corresponding shared memory space for the target memory identifier.
Optionally, the memory determining unit 1302 is specifically configured to:
if the target memory identifier does not exist, determining a corresponding shared memory space for the target memory identifier;
if the target memory identifier exists, acquiring a shared memory space corresponding to the target memory identifier or updating the corresponding shared memory space for the target memory identifier.
Optionally, the memory determining unit 1302 is specifically configured to:
creating a file corresponding to a target memory identifier in a storage space, wherein the position of the file is used as a shared memory space corresponding to the target memory identifier.
Optionally, the plurality of processes are used for at least one of image processing, audio and video encoding and decoding, and network communication.
According to the technical scheme, in the running environment based on the first programming language, the executable file based on the second programming language is loaded through the programming interface, the second programming language is a lower-layer programming language compared with the first programming language, the corresponding shared memory space can be determined for the target memory mark through the executable file based on the second programming language, the data to be shared in the memory of the running environment is copied to the shared memory space, and as the shared memory space is used for being accessed by a plurality of processes in the running environment, the processes can share the data by accessing the same data in the shared memory space, so that the data transmission efficiency among the processes is improved, and the application performance is improved. In addition, the target memory identifier and the memory area information of the shared memory space can be stored in the global variable, so that even if the executable file is executed, the target memory identifier and the memory area information of the shared memory space are reserved, the shared memory space cannot be released, and the stored data cannot be deleted, and therefore the access of a plurality of processes to the data in the shared memory space cannot be influenced even if the executable file is executed.
The embodiment of the application also provides a computer device, which is the computer device described above, and may include a terminal device or a server, where the memory sharing device described above may be configured in the computer device. The computer device is described below with reference to the accompanying drawings.
If the computer device is a terminal device, please refer to fig. 16, an embodiment of the present application provides a terminal device, taking the terminal device as a mobile phone as an example:
fig. 16 is a block diagram showing a part of the structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to fig. 16, the mobile phone includes: radio Frequency (RF) circuitry 1410, memory 1420, input unit 1430, display unit 1440, sensor 1450, audio circuitry 1460, wireless fidelity (WiFi) module 1470, processor 1480, and power supply 1490. Those skilled in the art will appreciate that the handset configuration shown in fig. 16 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 16:
The RF circuit 1410 may be used for receiving and transmitting signals during a message or a call, and particularly, after receiving downlink information of a base station, the downlink information is processed by the processor 1480; in addition, the data of the design uplink is sent to the base station.
The memory 1420 may be used to store software programs and modules, and the processor 1480 performs various functional applications and data processing of the cellular phone by executing the software programs and modules stored in the memory 1420. The memory 1420 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 1420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the handset. In particular, the input unit 1430 may include a touch panel 1431 and other input devices 1432.
The display unit 1440 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 1440 may include a display panel 1441.
The handset can also include at least one sensor 1450, such as a light sensor, motion sensor, and other sensors.
Audio circuitry 1460, speaker 1461, microphone 1462 may provide an audio interface between the user and the handset.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1470, so that wireless broadband Internet access is provided for the user.
The processor 1480 is a control center of the handset, connects various parts of the entire handset using various interfaces and lines, performs various functions of the handset and processes data by running or executing software programs and/or modules stored in the memory 1420, and invoking data stored in the memory 1420.
The handset also includes a power supply 1490 (e.g., a battery) that provides power to the various components.
In this embodiment, the processor 1480 included in the terminal apparatus also has the following functions:
loading, through a programming interface, an executable file based on a second programming language in a first programming language-based operating environment, the second programming language being a lower-level programming language than the first programming language;
Determining a corresponding shared memory space for a target memory identifier through the executable file, copying data to be shared in the memory of the operating environment to the shared memory space, and storing the target memory identifier and memory area information of the shared memory space to a global variable; the shared memory space is used for being accessed by a plurality of processes in the running environment.
If the computer device is a server, as shown in fig. 17, fig. 17 is a block diagram of the server 1500 provided in the embodiment of the present application, where the server 1500 may have a relatively large difference due to different configurations or performances, and may include one or more processors 1522, such as a central processing unit (Central Processing Units, abbreviated as CPU), a memory 1532, one or more storage media 1530 (such as one or more mass storage devices) storing application programs 1542 or data 1544. Wherein the memory 1532 and the storage medium 1530 may be transitory or persistent storage. The program stored on the storage medium 1530 may include one or more modules (not shown), each of which may include a series of instruction operations on the server. Still further, a processor 1522 may be provided in communication with the storage medium 1530, executing a series of instruction operations on the server 1500 in the storage medium 1530.
The Server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input/output interfaces 1558, and/or one or more operating systems 1541, such as Windows Server TM ,Mac OS X TM ,Unix TM , Linux TM ,FreeBSD TM Etc.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 17.
In addition, the embodiment of the application also provides a storage medium for storing a computer program for executing the method provided by the embodiment.
The present embodiments also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method provided by the above embodiments.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, where the above program may be stored in a computer readable storage medium, and when the program is executed, the program performs steps including the above method embodiments; and the aforementioned storage medium may be at least one of the following media: read-only Memory (ROM), RAM, magnetic disk or optical disk, etc.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, with reference to the description of the method embodiments in part. The apparatus and system embodiments described above are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is merely one specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered in the protection scope of the present application. Further combinations of the implementations provided in the above aspects may be made to provide further implementations. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. The memory sharing method is characterized by comprising the following steps:
loading, through a programming interface, an executable file based on a second programming language in a first programming language-based operating environment, the second programming language being a lower-level programming language than the first programming language;
determining a corresponding shared memory space for a target memory identifier through the executable file, copying data to be shared in the memory of the operating environment to the shared memory space, and storing the target memory identifier and memory area information of the shared memory space to a global variable; the shared memory space is used for being accessed by a plurality of processes in the running environment;
the determining a corresponding shared memory space for the target memory identifier includes:
creating a file corresponding to a target memory identifier in a storage space, wherein the position of the file is used as a shared memory space corresponding to the target memory identifier;
the copying the data to be shared in the memory of the operating environment to the shared memory space includes:
if the data type of the data to be shared is a reference type, determining the byte length of the data to be shared in a heap in the memory of the running environment;
According to the byte length, allocating an intermediate storage space for data to be shared in a stack in a memory in the running environment, and acquiring a character string pointer of the intermediate storage space;
writing the data to be shared into the intermediate storage space;
determining a byte starting address of the data to be shared in the intermediate storage space by using the character string pointer of the intermediate storage space, wherein the byte starting address of the data to be shared in the intermediate storage space is a byte starting address of the data to be shared in a stack of a memory of an operating environment;
according to the byte starting address and the byte length, each bit in the data to be shared is copied to the shared memory space in sequence by utilizing a character string pointer in the stack and a character string pointer in the shared memory space, wherein the copied data to be shared exists in a binary form in the shared memory space, an intermediate storage space is allocated according to the byte length to adapt to the size of the data to be shared, the byte starting address is acquired in an auxiliary mode through the character string pointer of the intermediate storage space, the copying of the data to be shared is assisted, and the data to be shared is defined according to a preset rule.
2. The method of claim 1, wherein determining the byte length of the data to be shared in the heap in the memory of the operating environment comprises:
and determining the byte length of the data to be shared according to the byte length of each attribute value of the data to be shared in the heap in the memory of the running environment.
3. The method according to claim 1, wherein the method further comprises:
acquiring data to be read in the shared memory space;
if the original data type of the data to be read is a reference type, carrying out format reduction on the data to be read to obtain the data to be processed with the reference type, wherein the reference type is an object type or a function type;
if the original data type of the data to be read is a basic type, the data to be read is subjected to format reduction to obtain the data to be processed with the basic type, wherein the basic type is a digital type or a character string type.
4. A method according to any one of claims 1-3, wherein the method further comprises:
deleting target memory information in the global variable through the executable file, wherein the target memory information comprises a to-be-deleted identifier in the target memory identifier and memory area information of a shared memory space corresponding to the to-be-deleted identifier so as to release the shared memory space corresponding to the to-be-deleted identifier.
5. A method according to any one of claims 1-3, wherein said determining a corresponding shared memory space for the target memory identifier comprises:
creating an initial shared memory space, and determining a shared memory space corresponding to the target memory identifier from the initial shared memory space; or alternatively, the first and second heat exchangers may be,
and creating a corresponding shared memory space for the target memory identifier.
6. A method according to any one of claims 1-3, wherein said determining a corresponding shared memory space for the target memory identifier comprises:
if the target memory identifier does not exist, determining a corresponding shared memory space for the target memory identifier;
if the target memory identifier exists, acquiring a shared memory space corresponding to the target memory identifier or updating the corresponding shared memory space for the target memory identifier.
7. A method according to any of claims 1-3, wherein the plurality of processes are used for at least one of image processing, audio video codec and network communication.
8. A memory sharing device, the device comprising:
a file loading unit, configured to load, in an operating environment based on a first programming language, an executable file based on a second programming language through a programming interface, where the second programming language is a lower-level programming language than the first programming language;
The memory determining unit is used for determining a corresponding shared memory space for the target memory identifier through the executable file; the shared memory space is used for being accessed by a plurality of processes in the running environment;
the data copying unit is used for copying the data to be shared in the memory of the running environment to the shared memory space;
the memory information storage unit is used for storing the target memory identifier and the memory area information of the shared memory space into a global variable;
the memory determining unit is specifically configured to:
creating a file corresponding to a target memory identifier in a storage space, wherein the position of the file is used as a shared memory space corresponding to the target memory identifier;
wherein the data copying unit includes:
the data information acquisition unit is used for determining the byte length of the data to be shared in the heap in the memory of the running environment if the data type of the data to be shared is a reference type; according to the byte length, allocating an intermediate storage space for data to be shared in a stack in a memory in the running environment, and acquiring a character string pointer of the intermediate storage space; writing the data to be shared into the intermediate storage space; determining a byte starting address of the data to be shared in the intermediate storage space by using the character string pointer of the intermediate storage space, wherein the byte starting address of the data to be shared in the intermediate storage space is a byte starting address of the data to be shared in a stack of a memory of an operating environment;
And the copying subunit is used for copying each bit in the data to be shared to the shared memory space in sequence by utilizing the character string pointer in the stack and the character string pointer in the shared memory space according to the byte starting address and the byte length, wherein the copied data to be shared exists in a binary form in the shared memory space, an intermediate storage space is allocated according to the byte length to adapt to the size of the data to be shared, the byte starting address is acquired in an auxiliary mode through the character string pointer of the intermediate storage space, and the copying of the data to be shared is assisted, and is defined according to a preset rule.
9. The apparatus according to claim 8, wherein the byte length acquisition unit is specifically configured to:
and determining the byte length of the data to be shared according to the byte length of each attribute value of the data to be shared in the heap in the memory of the running environment.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the data reading unit is used for acquiring the data to be read in the shared memory space;
the format reduction unit is used for carrying out format reduction on the data to be read to obtain the data to be processed with the reference type if the original data type of the data to be read is the reference type, wherein the reference type is an object type or a function type; if the original data type of the data to be read is a basic type, the data to be read is subjected to format reduction to obtain the data to be processed with the basic type, wherein the basic type is a digital type or a character string type.
11. The apparatus according to any one of claims 8-10, wherein the apparatus further comprises:
and the memory information deleting unit is used for deleting the target memory information in the global variable through the executable file, wherein the target memory information comprises a to-be-deleted identifier in the target memory identifier and memory area information of a shared memory space corresponding to the to-be-deleted identifier so as to release the shared memory space corresponding to the to-be-deleted identifier.
12. The apparatus according to any one of claims 8-10, wherein the memory determining unit is specifically configured to:
creating an initial shared memory space, and determining a shared memory space corresponding to the target memory identifier from the initial shared memory space; or alternatively, the first and second heat exchangers may be,
and creating a corresponding shared memory space for the target memory identifier.
13. The apparatus according to any one of claims 8-10, wherein the memory determining unit is specifically configured to:
if the target memory identifier does not exist, determining a corresponding shared memory space for the target memory identifier;
if the target memory identifier exists, acquiring a shared memory space corresponding to the target memory identifier or updating the corresponding shared memory space for the target memory identifier.
14. The apparatus of any of claims 8-10, wherein the plurality of processes are configured to perform at least one of image processing, audio video codec, and network communication.
15. A computer device, the computer device comprising a processor and a memory:
the memory is used for storing a computer program and transmitting the computer program to the processor;
the processor is configured to execute the memory sharing method according to any one of claims 1-7 according to instructions in the computer program.
16. A computer readable storage medium storing a computer program for executing the memory sharing method according to any one of claims 1 to 7.
CN202310831321.5A 2023-07-07 2023-07-07 Memory sharing method and related device Active CN116560878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310831321.5A CN116560878B (en) 2023-07-07 2023-07-07 Memory sharing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310831321.5A CN116560878B (en) 2023-07-07 2023-07-07 Memory sharing method and related device

Publications (2)

Publication Number Publication Date
CN116560878A CN116560878A (en) 2023-08-08
CN116560878B true CN116560878B (en) 2024-03-22

Family

ID=87486518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310831321.5A Active CN116560878B (en) 2023-07-07 2023-07-07 Memory sharing method and related device

Country Status (1)

Country Link
CN (1) CN116560878B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117077115B (en) * 2023-10-13 2023-12-15 沐曦集成电路(上海)有限公司 Cross-language multi-process interaction method, electronic equipment and medium in chip verification stage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168269A (en) * 2021-12-15 2022-03-11 工银科技有限公司 WebAssembly data execution method, device, equipment and medium
CN114518969A (en) * 2022-02-18 2022-05-20 杭州朗和科技有限公司 Inter-process communication method, system, storage medium and computer device
CN114764426A (en) * 2021-01-15 2022-07-19 腾讯科技(深圳)有限公司 Data access method and device and data storage method and device
CN115576716A (en) * 2022-10-28 2023-01-06 珠海一微半导体股份有限公司 Memory management method based on multiple processes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160285970A1 (en) * 2015-03-27 2016-09-29 International Business Machines Corporation Network communication between virtual machine applications via direct memory access

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114764426A (en) * 2021-01-15 2022-07-19 腾讯科技(深圳)有限公司 Data access method and device and data storage method and device
CN114168269A (en) * 2021-12-15 2022-03-11 工银科技有限公司 WebAssembly data execution method, device, equipment and medium
CN114518969A (en) * 2022-02-18 2022-05-20 杭州朗和科技有限公司 Inter-process communication method, system, storage medium and computer device
CN115576716A (en) * 2022-10-28 2023-01-06 珠海一微半导体股份有限公司 Memory management method based on multiple processes

Also Published As

Publication number Publication date
CN116560878A (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN107395665B (en) Block chain service acceptance and service consensus method and device
CN113287286B (en) Input/output processing in distributed storage nodes over RDMA
US20220253458A1 (en) Method and device for synchronizing node data
US11093148B1 (en) Accelerated volumes
CN111475235B (en) Acceleration method, device, equipment and storage medium for function calculation cold start
CN108628688B (en) Message processing method, device and equipment
US10817312B2 (en) Programming model for performant computing in document-oriented storage services
CN116560878B (en) Memory sharing method and related device
CN111787126B (en) Container creation method, server, and storage medium
CN112578997A (en) Data migration method, system and related equipment
CN110875935A (en) Message publishing, processing and subscribing method, device and system
CN113641413A (en) Target model loading and updating method and device, readable medium and electronic equipment
CN112636992A (en) Dynamic routing method, device, equipment and storage medium
CN111240766A (en) Application starting method and device, electronic equipment and computer readable storage medium
CN115421787A (en) Instruction execution method, apparatus, device, system, program product, and medium
CN109918381B (en) Method and apparatus for storing data
CN114328097A (en) File monitoring method and device, electronic equipment and storage medium
JP2005228183A (en) Program execution method and computer system for executing the program
CN110750221B (en) Volume cloning method, apparatus, electronic device and machine-readable storage medium
CN113127430A (en) Mirror image information processing method and device, computer readable medium and electronic equipment
JP2019523480A (en) Preemptive decompression scheduling for NAND storage devices
WO2023066246A1 (en) Method and system for installing application on cloudphone, and client cloudphone
CN115426375A (en) Data processing method and data processing system
CN114595080A (en) Data processing method and device, electronic equipment and computer readable storage medium
EP4086781A1 (en) Data reading method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant