Search the web
Sign In
New User? Sign Up
ace-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[ace-users] The Development And Use Of ACE Shared Memory Like Class   Message List  
Reply | Forward Message #42979 of 42992 |
Re: [ace-users] The Development And Use Of ACE Shared Memory Like Class Objects

Shared memory (and memory mapped file as they are related) are in fact
"memory":) In you program you treate them as if they are from malloc().
You can cast them to your structure and manipulate them, or even use the
special form of new operator to construct a class instance. In most of the
cases, they are not intended to be used as a portable way to do object
serialization. Normally it works like this:

1. Instantiate a chunk of shared memroy from a memory mapped file.
2. Cast it to a structure or simply treate it as untype bytes.
3. Manipulate the shared memroy.
4. Flush or close it so that the changes are saved.

There is no need to have special read/write as long as the memory file is
used on the same machine(which is typically the case). If you want a
portable object serialization you can try ACE_CDR or boost::serialization.

>
> I have seen the ACE_Shared_Memory.h and ACE_Mem_Map
> but I do NOT see any "read" and "write" methods to
> update the pointer that eventually modifies the mapped
> file.
>

Yong
http://seclib.blogspot.com



Sat Oct 8, 2005 6:06 pm

seclib@...
Send Email Send Email

Forward
Message #42979 of 42992 |
Expand Messages Author Sort by Date

ACE Users, I am NOT including a PRF form since this question does NOT include any references to compile/link/or execution concerns of ACE. I am on a project...
Tom Wallick
tomwallick@...
Send Email
Oct 8, 2005
6:03 am

Shared memory (and memory mapped file as they are related) are in fact "memory":) In you program you treate them as if they are from malloc(). You can cast...
Xue Yong Zhi
seclib@...
Send Email
Oct 8, 2005
6:13 pm

Hi Folks, ... For examples of "higher-level" abstractions atop raw shared memory, check out the ACE_Malloc<> and ACE_MEM_SAP abstractions in ACE. There are...
Douglas C. Schmidt
schmidt@...
Send Email
Oct 9, 2005
1:04 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help