You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The number of elements in the array to be allocated.
Remarks
The member function returns the result of a call to cache::allocate(count) on the cache object belonging to the current thread. If no cache object has been allocated for the current thread, it first allocates one.
sync_per_thread::deallocate
Frees a specified number of objects from storage beginning at a specified position.
void deallocate(void* ptr, std::size_t count);
Parameters
Parameter
Description
ptr
A pointer to the first object to be deallocated from storage.
count
The number of objects to be deallocated from storage.
Remarks
The member function calls deallocate on the cache object belonging to the current thread. If no cache object has been allocated for the current thread, it first allocates one.
sync_per_thread::equals
Compares two caches for equality.
bool equals(const sync<Cache>& Other) const;
Parameters
Parameter
Description
Cache
The cache object of the synchronization filter.
Other
The cache object to compare for equality.
Return Value
false if no cache object has been allocated for this object or for Other in the current thread. Otherwise it returns the result of applying operator== to the two cache objects.