<!-- page01.html,v 1.4 2000/03/19 20:09:33 jcej Exp --> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Author" CONTENT="James CE Johnson"> <TITLE>ACE Tutorial 020</TITLE> </HEAD> <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000FFF" VLINK="#FF0F0F"> <CENTER><B><FONT SIZE=+2>ACE Tutorial 020</FONT></B></CENTER> <CENTER><B><FONT SIZE=+2>Sharing your Memories with persistence</FONT></B></CENTER> <P> <HR WIDTH="100%"> This tutorial mirrors the previous. Instead of using shared memory, this time we'll be using a memory-mapped file. <p> The cool thing about doing it this way is that we gain persistence of memory even across reboots. I wonder if you could memory map a file that's mounted via NFS? <p> Like the shared memory tutorial, this one is also very basic and primitive. I'm assuming you've read that one, so I'll just hit the high points this time through.. <P> Kirthika's abstract: <UL> Here, the ACE_Shared_Memory_MM class has been used to provide persistence of the contents of the shared memory resource used by the server and client. A memory_map which is really a file mapped onto memory appears like an array which can be easily manipulated while actually the data is stored in a file thus making the contents permanent. In the previous tutorial, this wasnt possible as we were dealing with shared memory allocated from the RAM. <P> Again, here too, the example consists of a server and a client sharing memory (the mem_map) and the server writing a a-z string to it which will be successfully converted to uppercase by the client. <P> Notice that, similarities in usage abound between the previous and the current tutorial which will prove to be a force for templatisation. For that we need to go ahead -- to the next tutorial! </UL> <P><HR WIDTH="100%"> <CENTER>[<A HREF="../online-tutorials.html">Tutorial Index</A>] [<A HREF="page02.html">Continue This Tutorial</A>]</CENTER>