1 #include "ace/Shared_Memory_SV.h"
3 #if !defined (__ACE_INLINE__)
4 #include "ace/Shared_Memory_SV.inl"
5 #endif /* __ACE_INLINE__ */
7 #if defined (ACE_HAS_ALLOC_HOOKS)
8 # include "ace/Malloc_Base.h"
9 #endif /* ACE_HAS_ALLOC_HOOKS */
11 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
13 ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_SV
)
16 ACE_Shared_Memory_SV::dump () const
18 #if defined (ACE_HAS_DUMP)
19 ACE_TRACE ("ACE_Shared_Memory_SV::dump");
20 #endif /* ACE_HAS_DUMP */
23 ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (key_t id
,
29 : shared_memory_ (id
, length
, create
, perms
, addr
, flags
)
31 ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV");
34 /// The overall size of the segment.
36 ACE_Shared_Memory_SV::get_segment_size () const
38 ACE_TRACE ("ACE_Shared_Memory_SV::get_segment_size");
39 // This cast is ok since the 'open' method for this class allows only
40 // an 'int' size. Therefore, this case should not lose information.
41 return this->shared_memory_
.get_segment_size ();
44 /// Removes the shared memory segment.
46 ACE_Shared_Memory_SV::remove ()
48 ACE_TRACE ("ACE_Shared_Memory_SV::remove");
49 return shared_memory_
.remove ();
52 /// Closes (detaches) the shared memory segment.
54 ACE_Shared_Memory_SV::close ()
56 ACE_TRACE ("ACE_Shared_Memory_SV::close");
57 return shared_memory_
.detach ();
61 ACE_Shared_Memory_SV::malloc (size_t)
63 ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
64 return this->shared_memory_
.get_segment_ptr ();
68 ACE_Shared_Memory_SV::get_id () const
70 ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
71 return this->shared_memory_
.get_id ();
75 ACE_Shared_Memory_SV::free (void *p
)
77 ACE_TRACE ("ACE_Shared_Memory_SV::free");
81 ACE_END_VERSIONED_NAMESPACE_DECL