July 2007
Intermediate to advanced
332 pages
10h 4m
English
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> >;