ACE_Locked_Free_List< T, ACE_LOCK > Class Template ReferenceImplements a free list. More...
Inheritance diagram for ACE_Locked_Free_List< T, ACE_LOCK >:
Collaboration diagram for ACE_Locked_Free_List< T, ACE_LOCK >:
Detailed Descriptiontemplate<class T, class ACE_LOCK>
Implements a free list.
|
ACE_Locked_Free_List< T, ACE_LOCK >::ACE_Locked_Free_List | ( | int | mode = ACE_FREE_LIST_WITH_POOL , |
|
size_t | prealloc = ACE_DEFAULT_FREE_LIST_PREALLOC , |
|||
size_t | lwm = ACE_DEFAULT_FREE_LIST_LWM , |
|||
size_t | hwm = ACE_DEFAULT_FREE_LIST_HWM , |
|||
size_t | inc = ACE_DEFAULT_FREE_LIST_INC | |||
) | [inline] |
Constructor takes a mode (i.e., ACE_FREE_LIST_WITH_POOL or ACE_PURE_FREE_LIST), a count of the number of nodes to <prealloc>, a low and high water mark (<lwm> and <hwm>) that indicate when to allocate more nodes, an increment value (<inc>) that indicates how many nodes to allocate when the list must grow.
ACE_Locked_Free_List< T, ACE_LOCK >::~ACE_Locked_Free_List | ( | void | ) | [inline, virtual] |
Destructor - removes all the elements from the free_list.
ACE_Locked_Free_List< T, ACE_LOCK >::ACE_Locked_Free_List | ( | const ACE_Locked_Free_List< T, ACE_LOCK > & | ) | [private] |
void ACE_Locked_Free_List< T, ACE_LOCK >::add | ( | T * | element | ) | [inline, virtual] |
Inserts an element onto the free list (if it isn't past the high water mark).
Implements ACE_Free_List< T >.
T * ACE_Locked_Free_List< T, ACE_LOCK >::remove | ( | void | ) | [inline, virtual] |
Takes a element off the freelist and returns it. It creates <inc> new elements if the size is at or below the low water mark.
Implements ACE_Free_List< T >.
size_t ACE_Locked_Free_List< T, ACE_LOCK >::size | ( | void | ) | [inline, virtual] |
void ACE_Locked_Free_List< T, ACE_LOCK >::resize | ( | size_t | newsize | ) | [inline, virtual] |
void ACE_Locked_Free_List< T, ACE_LOCK >::alloc | ( | size_t | n | ) | [inline, protected, virtual] |
Allocates n extra nodes for the freelist.
void ACE_Locked_Free_List< T, ACE_LOCK >::dealloc | ( | size_t | n | ) | [inline, protected, virtual] |
Removes and frees n nodes from the freelist.
void ACE_Locked_Free_List< T, ACE_LOCK >::operator= | ( | const ACE_Locked_Free_List< T, ACE_LOCK > & | ) | [private] |
int ACE_Locked_Free_List< T, ACE_LOCK >::mode_ [protected] |
Free list operation mode, either ACE_FREE_LIST_WITH_POOL or ACE_PURE_FREE_LIST.
T* ACE_Locked_Free_List< T, ACE_LOCK >::free_list_ [protected] |
Pointer to the first node in the freelist.
size_t ACE_Locked_Free_List< T, ACE_LOCK >::lwm_ [protected] |
Low water mark.
size_t ACE_Locked_Free_List< T, ACE_LOCK >::hwm_ [protected] |
High water mark.
size_t ACE_Locked_Free_List< T, ACE_LOCK >::inc_ [protected] |
Increment value.
size_t ACE_Locked_Free_List< T, ACE_LOCK >::size_ [protected] |
Keeps track of the size of the list.
ACE_LOCK ACE_Locked_Free_List< T, ACE_LOCK >::mutex_ [protected] |
Synchronization variable for ACE_Timer_Queue.