Skip to content

Latest commit

 

History

History
99 lines (65 loc) · 2.63 KB

File metadata and controls

99 lines (65 loc) · 2.63 KB
title sync_none Class
ms.date 11/04/2016
f1_keywords
allocators/stdext::sync_none
allocators/stdext::sync_none::allocate
allocators/stdext::sync_none::deallocate
allocators/stdext::sync_none::equals
helpviewer_keywords
stdext::sync_none
stdext::sync_none [C++], allocate
stdext::sync_none [C++], deallocate
stdext::sync_none [C++], equals
ms.assetid f7473cee-14f3-4fe1-88bc-68cd085e59e1

sync_none Class

Describes a synchronization filter that provides no synchronization.

Syntax

template <class Cache>
class sync_none

Parameters

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

Member functions

Member function Description
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.

Requirements

Header: <allocators>

Namespace: stdext

sync_none::allocate

Allocates a block of memory.

void *allocate(std::size_t count);

Parameters

Parameter Description
count The number of elements in the array to be allocated.

Remarks

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

sync_none::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 cache.deallocate(ptr, count), where cache represents the cache object.

sync_none::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

The member function always returns true.

Remarks

See also

<allocators>