sync_none Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at sync_none Class.

Describes a synchronization filter that provides no synchronization.

template <class Cache>  
class sync_none

Parameters

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

Member Functions

allocateAllocates a block of memory.
deallocateFrees a specified number of objects from storage beginning at a specified position.
equalsCompares two caches for equality.

Header: <allocators>

Namespace: stdext

Allocates a block of memory.

void *allocate(std::size_t count);

Parameters

ParameterDescription
countThe number of elements in the array to be allocated.

Remarks

The member function returns cache.allocate(count), where cache is the cache object.

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

void deallocate(void* ptr, std::size_t count);

Parameters

ParameterDescription
ptrA pointer to the first object to be deallocated from storage.
countThe number of objects to be deallocated from storage.

Remarks

The member function calls cache.deallocate(ptr, count), where cache represents the cache object.

Compares two caches for equality.

bool equals(const sync<Cache>& Other) const;

Parameters

ParameterDescription
CacheThe cache object of the synchronization filter.
OtherThe cache object to compare for equality.

Return Value

The member function always returns true.

Remarks

<allocators>

Show: