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 (void) 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.
37 ACE_Shared_Memory_SV::get_segment_size (void) const
39 ACE_TRACE ("ACE_Shared_Memory_SV::get_segment_size");
40 // This cast is ok since the 'open' method for this class allows only
41 // an 'int' size. Therefore, this case should not lose information.
42 return this->shared_memory_
.get_segment_size ();
45 // Removes the shared memory segment.
48 ACE_Shared_Memory_SV::remove (void)
50 ACE_TRACE ("ACE_Shared_Memory_SV::remove");
51 return shared_memory_
.remove ();
54 // Closes (detaches) the shared memory segment.
57 ACE_Shared_Memory_SV::close (void)
59 ACE_TRACE ("ACE_Shared_Memory_SV::close");
60 return shared_memory_
.detach ();
64 ACE_Shared_Memory_SV::malloc (size_t)
66 ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
67 return this->shared_memory_
.get_segment_ptr ();
71 ACE_Shared_Memory_SV::get_id (void) const
73 ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
74 return this->shared_memory_
.get_id ();
78 ACE_Shared_Memory_SV::free (void *p
)
80 ACE_TRACE ("ACE_Shared_Memory_SV::free");
84 ACE_END_VERSIONED_NAMESPACE_DECL