2 #include "ace/RW_Thread_Mutex.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 ACE_MEM_SAP_Node::ACE_MEM_SAP_Node (size_t cap)
15 ACE_MEM_SAP_Node::size () const
21 ACE_MEM_SAP_Node::capacity () const
23 return this->capacity_;
27 ACE_MEM_SAP_Node::data ()
33 ACE_INLINE ACE_MEM_SAP_Node *
34 ACE_MEM_SAP::acquire_buffer (const ssize_t size)
36 ACE_TRACE ("ACE_MEM_SAP::acquire_buffer");
37 if (this->shm_malloc_ == 0)
38 return 0; // not initialized.
40 ACE_MEM_SAP_Node *buf = 0;
42 ACE_NEW_MALLOC_RETURN (buf,
43 static_cast<ACE_MEM_SAP_Node *>
44 (this->shm_malloc_->malloc (sizeof (ACE_MEM_SAP_Node) + size)),
45 ACE_MEM_SAP_Node (size),
51 ACE_MEM_SAP::release_buffer (ACE_MEM_SAP_Node *buf)
53 ACE_TRACE ("ACE_MEM_SAP::release_buffer");
54 if (this->shm_malloc_ == 0)
55 return -1; // not initialized.
57 this->shm_malloc_->free (buf);
61 ACE_END_VERSIONED_NAMESPACE_DECL