Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Shared_Memory_SV.cpp
blob03e3069b92f94de4c0cbcefc04e83c1c65efbf0f
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)
15 void
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,
24 size_t length,
25 int create,
26 int perms,
27 void *addr,
28 int flags)
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.
35 size_t
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.
45 int
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.
53 int
54 ACE_Shared_Memory_SV::close ()
56 ACE_TRACE ("ACE_Shared_Memory_SV::close");
57 return shared_memory_.detach ();
60 void *
61 ACE_Shared_Memory_SV::malloc (size_t)
63 ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
64 return this->shared_memory_.get_segment_ptr ();
67 ACE_HANDLE
68 ACE_Shared_Memory_SV::get_id () const
70 ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
71 return this->shared_memory_.get_id ();
74 int
75 ACE_Shared_Memory_SV::free (void *p)
77 ACE_TRACE ("ACE_Shared_Memory_SV::free");
78 return p != 0;
81 ACE_END_VERSIONED_NAMESPACE_DECL