Export (0) Print
Expand All

sync_per_thread Class

Describes a synchronization filter that provides a separate cache object for each thread.

template <class Cache> class sync_per_thread

Parameter

Description

Cache

The type of cache associated with the synchronization filter. This can be cache_chunklist, cache_freelist, or cache_suballoc.

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.

allocate

Allocates a block of memory.

deallocate

Frees a specified number of objects from storage beginning at a specified position.

equals

Compares two caches for equality.

Header: <allocators>

Namespace: stdext

Show:
© 2014 Microsoft