1 / 9
文档名称:

Article - Use Objects In Linux - Making Memory Work For You, (C , Programming, Unix).pdf

格式:pdf   页数:9
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Article - Use Objects In Linux - Making Memory Work For You, (C , Programming, Unix).pdf

上传人:bolee65 2014/3/9 文件大小:0 KB

下载得到文件列表

Article - Use Objects In Linux - Making Memory Work For You, (C , Programming, Unix).pdf

文档介绍

文档介绍:Use shared objects on Linux
   Make shared memory work for you, not against you
(sachin_******@in.)
Senior Software Engineer, IBM Software Labs India
11 May 2004
Making the most of shared memory isn't always easy. In this article, IBM's Sachin
Agrawal shares his expertise in C++, showing how the object­oriented among us
can take key advantage of a uniquely useful munications
channel.
In terms of time and space, shared memory is probably the most efficient inter­process
communication channel provided by all modern operating systems. Shared memory is
simultaneously mapped to the address space of more than one process: a process simply
attaches to the shared memory and municating with other processes by using it as
it would use ordinary memory. 
However, in the object­oriented programming world, processes prefer to share objects rather
than raw information. With objects, there is no need to serialize, transport, and de­serialize
the information contained within the object. Shared objects also reside in shared memory,
and although such objects "belong" to the process that created them, all processes on the
system can access them. Hence, all of the information within a shared object should be
strictly process­neutral. 
This is a direct contradiction to the C++ object model currently adopted by all popular
compilers: C++ objects invariably contain pointers t