The interface to scalable_allocator
and cache_aligned_allocator
is identical to std::allocator
and conforms to the relevant requirements in the ISO C++ standard, so you can use either as the allocator
argument to STL template classes. The following code shows how to declare an STL vector that uses cache_aligned_allocator
for allocation:
std::vector< int, cache_aligned_allocator<int> >;
18.191.211.66