Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - shared global variant in shared library.: (4 Items)
   
shared global variant in shared library.  
I made a shared library. In this library, there are a global structure variant. Usually, the each process linking this 
library has it's own copy of this structure, many processes have many special copies.
But I want there are only one copy and all the process share this one.
How should I do?
Re: shared global variant in shared library.  
You can use shared memory. See shm_open documentation for an example.

On Mon, 2010-04-19 at 05:15 -0400, Johnson Gu wrote:
> I made a shared library. In this library, there are a global structure variant. Usually, the each process linking this
 library has it's own copy of this structure, many processes have many special copies.
> But I want there are only one copy and all the process share this one.
> How should I do?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post52008
> 

Re: shared global variant in shared library.  
Got it.
But is there any other ways beside "share memory"? 
In windows, we can put the variant in shared section, any similar things in QNX?
Re: shared global variant in shared library.  
On Mon, 2010-04-19 at 21:38 -0400, Johnson Gu wrote:
> Got it.
> But is there any other ways beside "share memory"? 
> In windows, we can put the variant in shared section, any similar things in QNX?


I am not aware of anything similar to that.




-- 
Aleksandar Ristovski
QNX Software Systems