equal
deleted
inserted
replaced
31 #include "utilities/copy.hpp" |
31 #include "utilities/copy.hpp" |
32 |
32 |
33 template <MEMFLAGS F> StackBase<F>::StackBase(size_t segment_size, size_t max_cache_size, |
33 template <MEMFLAGS F> StackBase<F>::StackBase(size_t segment_size, size_t max_cache_size, |
34 size_t max_size): |
34 size_t max_size): |
35 _seg_size(segment_size), |
35 _seg_size(segment_size), |
36 _max_cache_size(max_cache_size), |
36 _max_size(adjust_max_size(max_size, segment_size)), |
37 _max_size(adjust_max_size(max_size, segment_size)) |
37 _max_cache_size(max_cache_size) |
38 { |
38 { |
39 assert(_max_size % _seg_size == 0, "not a multiple"); |
39 assert(_max_size % _seg_size == 0, "not a multiple"); |
40 } |
40 } |
41 |
41 |
42 template <MEMFLAGS F> size_t StackBase<F>::adjust_max_size(size_t max_size, size_t seg_size) |
42 template <MEMFLAGS F> size_t StackBase<F>::adjust_max_size(size_t max_size, size_t seg_size) |