shared-memory

Shared memory of same DLL in different 32 bit processes is sometimes different in a terminal session on Windows server 2008 with 64 bit

We have an 32 bit application consisting of some processes. They communicate with shared memory of a DLL used by every process. Shared memory is build with global variables in C++ by "#pragma data_seg ("Shared")". When running this application sometime during starting a new process in addition to an existing (first) process we observe t...

What is the /dev/shm equivalence in Windows System ?

I was wondering how can I make the IO faster by writing and reading temporary files to main memory. I've used to write to /dev/shm in Linux. But now I'm in Windows 7. Anyone knows the answer ? Thanks ...

Locking mechanisms for shared-memory consistency

Hi all, I'm developing a mechanism for interchanging data between two or more processes using shared memory on linux. The problem is some level of concurrency control is required to maintain data integrity on the shared memory itself, and as I'm specting that sometime or another my process could be killed/crash, common lock mechanisms d...

Boost::Interprocess Shared Memory Bus Error

Hi, I'm using CentOS 5.4 x86_64 and Boost 1.42.0 on a cluster that uses Open-MPI 1.3.3. I'm writing a shared library that uses shared memory to store large amounts of data for multiple processes to use. There's also a loader application that will read in the data from the files and load them into the shared memory. When I run the l...

Is heap memory a common memory location shared by different processes?

Every process can use heap memory to store and share data within the process. We have a rule in programming whenever we take some space in heap memory, we need to release it once job is done, else it leads to memory leaks. int *pIntPtr = new int; . . . delete pIntPtr; My question is, will the heap memory exist when the application/pro...

Shared memory and comunication between programs

I read this: http://stackoverflow.com/questions/1109870/python-singleton-into-multiprocessing but I didn't find the solution of my problem. I have to run the same program (not process) many times in one time. Programs work in the same electronic devices. I must synchronized this programs. Only one program can use device in the moment. ...

Passing a pointer to an object onto a child application.

So basically, I have two applications. Application 1 launches Application 2 but it remains in memory. When Application 2 is started it needs to be given a pointer to a CALayer object which is stored in the first application. The object represented by the pointer needs to be accessible by both applications. I am using Objective-C. I wou...

Distributed Shared Memory in .NET

Are there any existing libraries/frameworks/products for a distributed shared memory system implemented in .NET, or easily accessible from .NET clients? Googling gives some links to academic papers, but I couldn't find any real implementations. Note: I am most interested in something that runs on a LAN, not in "cloud". ...

An example of pushing and retrieving of an NSObject's pointer in ObjC from Shared Memory?

I know that there are better ways of sharing objects such as distributed objects but my situation is quite difficult. I'm working on two iPhone apps which are running parallely and need to share an object. That object happens to be a CALayer and it needs to be accessible by both applications. Second application adds its own CALayer to th...

Points to consider when implementing shared memory

I am planning to implement boost's shared memory between a Server (C++) and client (C# application). There is only reader and one writer and frequency of data share (read and write) is thousands of time per millisecond. What are the risks involved? ...

Is there any way to convert unshared heap memory to shared memory? Primary target *nix.

I was wondering whether there is any reasonably portable way to take existing, unshared heap memory and to convert it into shared memory. The usage case is a block of memory which is too large for me to want to copy it unnecessarily (i.e. into a new shared memory segment) and which is allocated by routines out of my control. The primar...

dr dobbs cuda (reversing arrays) tutorial

I was reading Supercomputing for the Masses: Part 5 on Dr.Dobb's and I have a question concerning the author's code for (fast) reversing arrays. I understand the need to use shared memory but I didn't get the performance gain in the code of reverseArray_multiblock_fast.cu In reverseArray_multiblock_fast.cu an array element is trans...

Multi-threading: How to 'Lock' an Object by One or More Threads

I have one 'main' thread that creates an array of objects of class SlowData. These objects are relatively slow to manipulate with. This is why, when I initially load them, they are filled with stub data. Immediately after each object in the array is loaded, I can display the array in the UI. Parallel with that, I initiate the computatio...

Why do I need a memorybarrier

C# 4 in a Nutshell (highly recommended btw) uses the following code to demonstrate the concept of MemoryBarrier (assuming A and B were run on different threads): class Foo{ int _answer; bool complete; void A(){ _answer = 123; Thread.MemoryBarrier(); // Barrier 1 _complete = true; Thread.MemoryBarrier(); // Barrier ...

POSIX shared memory + directories

The OS I'm working on (IBM CNK, which is not Linux, but somewhat POSIX-compliant) doesn't allow me to simply create a new file or directory in /dev/shm using fopen() or mkdir(), respectively. It looks like I have to use shm_open() to get a file descriptor and then fdopen() to use the shared region for file I/O. Do I need to set the siz...

IPC bottleneck?

I have two processes, a producer and a consumer. IPC is done with OpenFileMapping/MapViewOfFile on Win32. The producer receives video from another source, which it then passes over to the consumer and synchronization is done through two events. For the producer: Receive frame Copy to shared memory using CopyMemory Trigger DataProduced...

Saving RAM on Shared Hosting with persistent process web service (e.g. Ruby on Rails, Turbogears, etc.)

I use Turbogears on my shared hosting for one-off applications, but I don't need these applications active all the time. Is there a way to start the service when I request it, and then kill the process when it's idle? For example, Turbogears will have a persistent process: "paster serve production.ini" that I would like killed if there...

send data from c to perl

hi for a project i need to send some data from c program to Perl program that both in running mode (Perl program in sleep mode and c program running, and c program sends data to Perl). i know that, can write this program by socket and shared memory but i have performance problem. i think shared memory is better solution, and how can i ...

If MPI is Message Passing Interface, then what is MPICH ?

Can anyone defines clearly what is MPICH ? For what it is used ? Its relation with MPI. Why do we need MPICH ? ...

Using shared memory on a shared hosting Linux account

Hello! I want to optimize the access to some files that are always read by my custom script, using the shared memory functions of PHP. But there are some questions I have: In a shared hosting (like GoDaddy's Linux Unlimited Hosting), is a single computer executing all of the script's instances, or could there be several computers due t...