3 //==========================================================================
5 * @file Shared_Memory.h
7 * $Id: Shared_Memory.h 80826 2008-03-04 14:51:23Z wotte $
11 //==========================================================================
14 #ifndef ACE_SHARED_MEMORY_H
15 #define ACE_SHARED_MEMORY_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/ACE_export.h"
21 #include "ace/os_include/os_stddef.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @class ACE_Shared_Memory
32 * @brief This base class adapts both System V shared memory and "BSD"
33 * mmap to a common API.
35 * This is a very simple-minded wrapper, i.e., it really is only
36 * useful for allocating large contiguous chunks of shared
37 * memory. For a much more sophisticated version, please check
38 * out the <ACE_Malloc> class.
40 class ACE_Export ACE_Shared_Memory
43 virtual ~ACE_Shared_Memory (void);
45 // = Note that all the following methods are pure virtual.
46 virtual int close (void) = 0;
47 virtual int remove (void) = 0;
48 virtual void *malloc (size_t = 0) = 0;
49 virtual int free (void *p
) = 0;
50 virtual size_t get_segment_size (void) const = 0;
51 virtual ACE_HANDLE
get_id (void) const = 0;
54 ACE_END_VERSIONED_NAMESPACE_DECL
56 #include /**/ "ace/post.h"
58 #endif /* ACE_SHARED_MEMORY_H */