aboutsummaryrefslogtreecommitdiff
path: root/dep/ACE_wrappers/ace/Malloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dep/ACE_wrappers/ace/Malloc.cpp')
-rw-r--r--dep/ACE_wrappers/ace/Malloc.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/dep/ACE_wrappers/ace/Malloc.cpp b/dep/ACE_wrappers/ace/Malloc.cpp
index e0de20f1de3..b9684654c10 100644
--- a/dep/ACE_wrappers/ace/Malloc.cpp
+++ b/dep/ACE_wrappers/ace/Malloc.cpp
@@ -1,34 +1,44 @@
// $Id: Malloc.cpp 80826 2008-03-04 14:51:23Z wotte $
+
#include "ace/Malloc.h"
+
#if !defined (__ACE_INLINE__)
#include "ace/Malloc.inl"
#endif /* __ACE_INLINE__ */
+
#include "ace/Object_Manager.h"
#include "ace/Malloc_Base.h"
#include "ace/OS_NS_string.h"
+
ACE_RCSID (ace,
Malloc,
"$Id: Malloc.cpp 80826 2008-03-04 14:51:23Z wotte $")
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
// Process-wide ACE_Allocator.
ACE_Allocator *ACE_Allocator::allocator_ = 0;
+
// Controls whether the Allocator is deleted when we shut down (we can
// only delete it safely if we created it!) This is no longer used;
// see ACE_Allocator::instance (void).
int ACE_Allocator::delete_allocator_ = 0;
+
void
ACE_Control_Block::ACE_Malloc_Header::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Control_Block::ACE_Malloc_Header::dump");
+
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_block = %@"), (ACE_Malloc_Header *) this->next_block_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize = %d\n"), this->size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
+
void
ACE_Control_Block::print_alignment_info (void)
{
@@ -64,32 +74,39 @@ ACE_Control_Block::print_alignment_info (void)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End <--- ACE_Control_Block::print_alignment_info:\n")));
#endif /* ACE_HAS_DUMP */
}
+
void
ACE_Control_Block::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Control_Block::dump");
+
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
for (ACE_Name_Node *nextn = this->name_head_;
nextn != 0;
nextn = nextn->next_)
nextn->dump ();
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %@"), (ACE_Malloc_Header *) this->freep_));
this->base_.dump ();
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
nexth != 0 && nexth != &this->base_;
nexth = nexth->next_block_)
nexth->dump ();
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
+
ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (void)
{
ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::ACE_Name_Node");
}
+
ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (const char *name,
char *name_ptr,
char *pointer,
@@ -105,21 +122,25 @@ ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (const char *name,
if (next != 0)
next->prev_ = this;
}
+
const char *
ACE_Control_Block::ACE_Name_Node::name (void) const
{
return this->name_;
}
+
ACE_Control_Block::ACE_Malloc_Header::ACE_Malloc_Header (void)
: next_block_ (0),
size_ (0)
{
}
+
void
ACE_Control_Block::ACE_Name_Node::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::dump");
+
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("pointer = %@"), (const char *) this->pointer_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %@"), (ACE_Name_Node *) this->next_));
@@ -132,6 +153,7 @@ ACE_Control_Block::ACE_Name_Node::dump (void) const
#endif /* ACE_HAS_DUMP */
}
+
#if defined (ACE_HAS_MALLOC_STATS)
ACE_Malloc_Stats::ACE_Malloc_Stats (void)
: nchunks_ (0),
@@ -140,15 +162,18 @@ ACE_Malloc_Stats::ACE_Malloc_Stats (void)
{
ACE_TRACE ("ACE_Malloc_Stats::ACE_Malloc_Stats");
}
+
void
ACE_Malloc_Stats::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Malloc_Stats::dump");
+
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
int const nblocks = this->nblocks_.value ();
int const ninuse = this->ninuse_.value ();
int const nchunks = this->nchunks_.value ();
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("nblocks = %d"), nblocks));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nninuse = %d"), ninuse));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnchunks = %d"), nchunks));
@@ -156,6 +181,8 @@ ACE_Malloc_Stats::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
+
#endif /*ACE_HAS_MALLOC_STATS*/
+
ACE_END_VERSIONED_NAMESPACE_DECL