c++ - How to get Shared Object in Shared Memory -


Our app depends on external, third party-supplied configuration (including custom driving / decision-making tasks). .

Independently, it cooperates with external CGI modules, a part of shared memory, where almost all instability states are kept, so that external modules can read it and modify it wherever applicable. Able to do

The problem is that the CGI module requires many types of permanent config data. Additionally, to provide main app data, it completes unnecessary duplication between two memory areas. The idea is to load the shared object in shared memory, and to make the CGI directly available. The problem is how?

  • To specify where to load the SO file, the deluxe and DSLSM do not provide any facilities.
  • We tried shmat () It works only unless some external CGI actually does not try to reach the shared memory then the area pointed towards being privately as That was never shared. Maybe we're doing something wrong?
  • Loading. Therefore it is needed in every script, it is not beyond the question, the size of the call (a number of scripts once called to make live updates) is a huge size of the structure associated with it, and because it is an embedded app It does not go
  • Just memcpy () 'ing So shm is not good - some structures and all functions are connected to each other through pointers.
  • I think the easiest option is to use a memory map file, which Neil has already proposed if this option is good If it does not fill the way, then it is possible to define the alternative allocator dedicated to the alternative. Here's a good paper about this:

    There is also a library of Ion Gazette with shared_memory_object and related attributes. Ion has proposed a solution for the C ++ standardization committee for the future. TR: Can it signal a solution to consider.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -