|
楼主 |
发表于 2010-7-20 15:35:47
|
显示全部楼层
你是说自动减少内存池已分配内存的大小么?看这里
// Inserts an element onto the free list (if we are allowed to manage
// elements withing and it pasts the high water mark, delete the
// element)
template <class T, class ACE_LOCK> void
ACE_Locked_Free_List<T, ACE_LOCK>::add (T *element)
{
ACE_MT (ACE_GUARD (ACE_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_)
{
element->set_next (this->free_list_);
this->free_list_ = element;
this->size_++;
}
else
delete element;
} |
|