shared-memory

Anyone have a good shared memory container for C++?

I've long had a desire for an STLish container that I could place into a shared memory segment or a memory mapped file. I've considered the use of a custom allocator and placement new to place a regular STL container into a shared memory segment. (like this ddj article). The problem is that STL containers will internally have pointers t...

When should I use Scope Locking (Application, Server, etc...) vs named locking in ColdFusion?

When is it appropriate to use <cflock scope="application"> or it's ilk as opposed to <cflock name="foo">? Specifically, I'm interested in using CFLock to protect shared objects in the application, session, or server scopes, but I'm also interested in finding out about different uses of locking in ColdFusion. ...

Coldfusion locking question

Hello, I am wondering if I need to lock some code created in the application scope. If I create an object say userDAO.cfc in application scope so its available to all pages. Then if I have a method in that object say getUserInfo(userID) that would be called in different parts of the applications, do I need to lock this method? Thanks...

deleting shared memory with ipcrm in Linux

Hello, I am working with a shared memory application, and to delete the segments I use the following command: ipcrm -M 0x0000162e (this is the key) But I do not if I am doing the things right because when I run ipcs I see the same segment but with the key 0x0000000, is the memory segment really delete?. When I run several times my ap...

How to implement shared memory in .NET ?

I have a C++.NET app and a C#.NET app. I would like them to communicate via shared memory. How is it possible in .NET version 2.0 ? Mainly want to share a queue object. ...

using shared memory with php and c?

Can you use shared memory to communicate between php scripts and c program in windows? The c program runs all the time and uses memory mapped files ie: handle1 = CreateFileMapping( (HANDLE)0xFFFFFFFF, NULL, PAGE_READWRITE, 0, sizeof(byte)*BUFFER_SIZE, "my_foo" ); hView = (LPINT) MapViewOfFile(handle1, FILE_MAP_ALL_ACCESS, 0, 0, 0); ...

Using shared memory under Windows. How to pass different data

I currently try to implement some interprocess communication using the Windows CreateFileMapping mechanism. I know that I need to create a file mapping object with CreateFileMapping first and then create a pointer to the actual data with MapViewOfFile. The example then puts data into the mapfile by using CopyMemory. In my application I ...

I'm concerned this code isn't doing what I want it to because of the way objects are used.

I have the following code and I was wondering if someone could look at it for me. I have a multi-threaded application that all share an object and operate on it. I've created a pointer to a certain element of it, just so I don't have to type in the long path every time, but I'm concerned it might simply be modifying a copy of the share...

Seeking articles on shared memory locking issues.

I'm reviewing some code and feel suspicious of the technique being used. In a linux environment, there are two processes that attach multiple shared memory segments. The first process periodically loads a new set of files to be shared, and writes the shared memory id (shmid) into a location in the "master" shared memory segment. The se...

communicate btw 2 pc's using shared memory?

i have to build a concept to communicate between two computers using shared memory or tcp socket programming concepts..how do i go about it?is it possible to implement shared memory in a client server architecture?how do i go about it? ...

RE: Posix and System V IPC

Which IPC among message queues, shared memory and semaphores is easiest to convert to network IPC and which is the hardest. Would it be easier to convert System V shared memory to network IPC or Posix shared memory to network IPC ...

Looking for good analogy/examples for monitor verses semaphore.

A monitor is supposed to solve problems with semaphores in concurrent environments. I'm looking for a good analogy using a monitor verses semaphore. Please use information for the analogy: 4 tasks (TaskA, TaskB, TaskC, TaskD) 1 variable varX Each Task wants to manipulate varX based on some event. ...

Re: Shared Memory and Semaphores

Is an IPC mechanism using shared memory and semaphores for synchronization simplex like pipes or duplex like message queues? ...

Where do you place POSIX semaphores when using POSIX shared memory?

I'm trying to build a client server application using POSIX shared memory and POSIX semaphores. Do I have to place the semaphores inside the shared memory segment or can the semaphores just be global variables? I wish to adhere to POSIX convention. ...

why are some posix shared memory segments and posix semaphores not visible to ipcs

I built a client server application using posix shared memory and posix unnamed semaphores with pshared=1. The semaphores are placed inside the shared memory. The program runs fine, but when I type ipcs -m or ipcs -s, I do not see any shared memory segments or semaphores that I created. Why is it so? /* Server main function for implemen...

Good alternative to shared memory IPC for Java/C++ apps on Linux

Hi. I'm currently using shared memory for IPC between Java and C++ apps, but looking for a more convenient alternative. Can someone advice better method, but with same performance speed? Thanks! ...

Remote proxy with shared memory in C++

Suppose I have a daemon that is sharing it's internal state to various applications via shared memory. Processes can send IPC messages to the daemon on a named pipe to perform various operations. In this scenario, I would like to create a C++ wrapper class for clients that acts as a kind of "Remote Proxy" to hide some of the gory detai...

What are the effects of not detaching a Shared Memory Segment

Hello. What are the effects of not detaching a Shared Memory Segment? How different operating systems handle this? Can not detaching compromise the stability of the O.S? Thanks. ...

Options for a message passing system for a game

I'm working on an RTS game in C++ targeted at handheld hardware (Pandora). For reference, the Pandora has a single ARM processor at ~600Mhz and runs Linux. We're trying to settle on a good message passing system (both internal and external), and this is new territory for me. It may help to give an example of a message we'd like to pas...

Application Plugin

Hello, I'm developing some plugins to my application using the JEDI Plugin tecnology, but I run into a lot of problems with memory sharing specially when it handles Database connection. The main application uses the FASTMM4 memory manager. Does any one knows a bit more easy framework to work with plugins? ...