summaryrefslogtreecommitdiff
path: root/ace/Malloc_T.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2000-02-04 04:29:41 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2000-02-04 04:29:41 +0000
commit27bb0ece4bd970ef6e3c678cdd1d93f9d04da14e (patch)
treeca3dd7bb2a013d6a09e323006ae59c4adc276492 /ace/Malloc_T.cpp
parentfbdd26e939a8a35128bc1416512521db4ec1efdb (diff)
downloadATCD-27bb0ece4bd970ef6e3c678cdd1d93f9d04da14e.tar.gz
ChangeLogTag:Thu Feb 3 11:38:15 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'ace/Malloc_T.cpp')
-rw-r--r--ace/Malloc_T.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index 10164b01e66..b96087af560 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -344,7 +344,9 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes)
ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_);
currp->size_ -= nunits;
currp += currp->size_;
- MALLOC_HEADER::init_ptr (&currp->next_block_, 0, this->cb_ptr_);
+ MALLOC_HEADER::init_ptr (&currp->next_block_,
+ 0,
+ this->cb_ptr_);
currp->size_ = nunits;
}
this->cb_ptr_->freep_ = prevp;
@@ -354,9 +356,9 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes)
}
else if (currp == this->cb_ptr_->freep_)
{
- // We've wrapped around freelist without finding a block.
- // Therefore, we need to ask the memory pool for a new chunk
- // of bytes.
+ // We've wrapped around freelist without finding a
+ // block. Therefore, we need to ask the memory pool for
+ // a new chunk of bytes.
size_t chunk_bytes = 0;
@@ -369,8 +371,9 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes)
ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nchunks_);
ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.ninuse_);
- MALLOC_HEADER::init_ptr (&currp->next_block_, 0, this->cb_ptr_);
-
+ MALLOC_HEADER::init_ptr (&currp->next_block_,
+ 0,
+ this->cb_ptr_);
// Compute the chunk size in MALLOC_HEADER units.
currp->size_ = chunk_bytes / sizeof (MALLOC_HEADER);
@@ -661,7 +664,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::unbind (const char *name, void *
else
prev->next_ = curr->next_;
- if (curr->next_ != 0)
+ if (curr->next_)
curr->next_->prev_ = prev;
// This will free up both the node and the name due to our