Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for storing C++ object in shared memory

A technology for sharing memory and objects, applied in the field of operating systems, to reduce access pressure, shorten development cycles, and reduce usage

Inactive Publication Date: 2007-09-05
HUAWEI TECH CO LTD
View PDF0 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The technical problem solved by the present invention is to provide a method and device for storing C++ objects in shared memory, so as to solve the problem that cross-process interactive access to C++ objects and / or cascaded C++ objects in shared memory cannot be realized in the prior art question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for storing C++ object in shared memory
  • Method and device for storing C++ object in shared memory
  • Method and device for storing C++ object in shared memory

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The core of the present invention is that the operating system first sets the shared memory required by the process for the process running on the host, and the definition of the shared memory is a memory area reserved by the kernel for the purpose of exchanging information between multiple processes (segment), if the permissions are set properly, each process that wants to access the memory can map it to its own private address space, if a process updates the data in the segment, then other processes will see the update immediately, by Segments created by one process can also be read and written by another process. And map the address of the shared memory to a virtual address of the process space, the process that stores the C++ object and / or the cascaded C++ object to the shared memory accesses the set shared memory through the virtual address; at the same time, the process will The virtual address is stored in the set shared memory, and the address stored in the shar...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A method for storing C++ object in shared internal memory includes setting a section of shared internal memory for process of updating shared internal memory and mapping address of said shared internal memory onto certain virtual address of process space of said process, calling shared internal memory by said process through virtual address being stored in shared internal memory and defining said virtual address to be original virtual address then storing C++ object and / or cascaded C++ object in shared internal memory. The device used for realizing said method is also disclosed.

Description

technical field [0001] The invention relates to an operating system, in particular to a method and device for storing C++ objects in a shared memory. Background technique [0002] The shared memory is a feature provided by various operating systems such as UNIX. In C / C++ language, shmget and shmat (different operating systems may provide different API functions) return the address mapped to the process space. In this way, the shared memory can be operated like an ordinary memory space. In addition, the shared memory is mainly used for sharing data among multiple processes, and is a way of inter-process communication (IPC), allowing one or more processes to communicate through memory that simultaneously appears in their virtual address spaces. Because data does not need to be copied between client and server, shared memory is the fastest form of IPC. [0003] Each process that uses shared memory must connect it to virtual memory through a system call. The pages of the virtu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44
Inventor 徐永胜曹振峰姜琰祥
Owner HUAWEI TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More