diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-13 14:08:02 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-13 14:08:02 +0000 |
commit | 8735fc47de4e0f11284ad0ab5255cb897b6a8fcb (patch) | |
tree | 792853187330aaecaa4825a1d66202138e41d7e3 /ace/Free_List.i | |
parent | cf33e17fe1575ae56a0a697ad92836b1bf7fe4a2 (diff) | |
download | ATCD-8735fc47de4e0f11284ad0ab5255cb897b6a8fcb.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Free_List.i')
-rw-r--r-- | ace/Free_List.i | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ace/Free_List.i b/ace/Free_List.i index e808df608c5..cda5dd45e9f 100644 --- a/ace/Free_List.i +++ b/ace/Free_List.i @@ -8,8 +8,9 @@ template <class T, class LOCK> ACE_INLINE void ACE_Locked_Free_List<T, LOCK>::add (T *element) { ACE_MT (ACE_GUARD (LOCK, ace_mon, *this->mutex_)); - // Check to see that we not at the high water mark - if (this->mode_ == ACE_PURE_FREE_LIST || this->size_ >= this->hwm_) + // Check to see that we not at the high water mark. + if (this->mode_ == ACE_PURE_FREE_LIST + || this->size_ >= this->hwm_) { element->set_next (this->free_list_); this->free_list_ = element; @@ -31,10 +32,11 @@ ACE_Locked_Free_List<T, LOCK>::remove (void) // If we are at the low water mark, add some nodes if (this->mode_ != ACE_PURE_FREE_LIST && this->size_ <= this->lwm_) - this->alloc (this->inc_); + this->alloc (this->inc_); // Remove a node T *temp = this->free_list_; + if (temp != 0) { this->free_list_ = this->free_list_->get_next (); @@ -48,7 +50,7 @@ ACE_Locked_Free_List<T, LOCK>::remove (void) // Returns the current size of the free list template <class T, class LOCK> ACE_INLINE size_t -ACE_Locked_Free_List<T, LOCK>::size () +ACE_Locked_Free_List<T, LOCK>::size (void) { return this->size_; } |