3 //==========================================================================
5 * @file Shared_Memory.h
9 //==========================================================================
11 #ifndef ACE_SHARED_MEMORY_H
12 #define ACE_SHARED_MEMORY_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #include "ace/os_include/os_stddef.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 * @class ACE_Shared_Memory
29 * @brief This base class adapts both System V shared memory and "BSD"
30 * mmap to a common API.
32 * This is a very simple-minded wrapper, i.e., it really is only
33 * useful for allocating large contiguous chunks of shared
34 * memory. For a much more sophisticated version, please check
35 * out the ACE_Malloc class.
37 class ACE_Export ACE_Shared_Memory
40 virtual ~ACE_Shared_Memory ();
42 // = Note that all the following methods are pure virtual.
43 virtual int close () = 0;
44 virtual int remove () = 0;
45 virtual void *malloc (size_t = 0) = 0;
46 virtual int free (void *p
) = 0;
47 virtual size_t get_segment_size () const = 0;
48 virtual ACE_HANDLE
get_id () const = 0;
51 ACE_END_VERSIONED_NAMESPACE_DECL
53 #include /**/ "ace/post.h"
55 #endif /* ACE_SHARED_MEMORY_H */