C++ - STL & Shared memory
Hi, I am developing an application with 2 unrelated, arbitary processes having a C++ shared hash map between them to store data. However, I am facing the problem of creating this template hash map in shared memory. Can boost be used for this purpose? Can anybody please suggest me the implementation which can be used to do this? Thanks in advance. Best Regards, Ganesh B. ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==============================================================================
C++ - STL & Shared memoryYeah, it took me ages to get it right! You can use the old shmem (now improved and renamed interprocess) + multiindex with hashed indexes for fixed memory mapping of shared memo segments. If you can't afford fixed memo address then what I did is use old shmem (or new interprocess) and come up with my own implementation of a hash table with offset_ptrs. The proper thing though would be to make multiindex offset_ptr aware by the use of 'proper' memo allocators. That would be fantastic. Cheers -----Mensaje original----- De: Borse, Ganesh [mailto:ganesh.borse@credit-suisse.com] Enviado el: martes, 13 de marzo de 2007 4:13 Para: 'boost-users@lists.boost.org' Asunto: [Boost-users] C++ - STL & Shared memory Hi, I am developing an application with 2 unrelated, arbitary processes having a C++ shared hash map between them to store data. However, I am facing the problem of creating this template hash map in shared memory. Can boost be used for this purpose? Can anybody please suggest me the implementation which can be used to do this? Thanks in advance. Best Regards, Ganesh B. ============================================================================ == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================ ==
participants (2)
-
Berenguer Blasi
-
Borse, Ganesh