sync_per_thread Class
Describes a synchronization filter that provides a separate cache object for each thread.
template <class Cache> class sync_per_thread
Parameters
Parameter |
Description |
---|---|
Cache |
The type of cache associated with the synchronization filter. This can be cache_chunklist, cache_freelist, or cache_suballoc. |
Remarks
Allocators that use sync_per_thread can compare equal even though blocks allocated in one thread cannot be deallocated from another thread. When using one of these allocators memory blocks allocated in one thread should not be made visible to other threads. In practice this means that a container that uses one of these allocators should only be accessed by a single thread.
Member Functions
Allocates a block of memory. |
|
Frees a specified number of objects from storage beginning at a specified position. |
|
Compares two caches for equality. |
Requirements
Header: <allocators>
Namespace: stdext