Tue, 14 Apr 2015 11:40:13 +0200
8077420: Build failure with SS12u4
Reviewed-by: dholmes, lfoltan
src/share/vm/utilities/stack.hpp | file | annotate | diff | comparison | revisions | |
src/share/vm/utilities/stack.inline.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/utilities/stack.hpp Tue Jul 08 13:52:29 2014 -0400 1.2 +++ b/src/share/vm/utilities/stack.hpp Tue Apr 14 11:40:13 2015 +0200 1.3 @@ -96,11 +96,16 @@ 1.4 public: 1.5 friend class StackIterator<E, F>; 1.6 1.7 + // Number of elements that fit in 4K bytes minus the size of two pointers 1.8 + // (link field and malloc header). 1.9 + static const size_t _default_segment_size = (4096 - 2 * sizeof(E*)) / sizeof(E); 1.10 + static size_t default_segment_size() { return _default_segment_size; } 1.11 + 1.12 // segment_size: number of items per segment 1.13 // max_cache_size: maxmium number of *segments* to cache 1.14 // max_size: maximum number of items allowed, rounded to a multiple of 1.15 // the segment size (0 == unlimited) 1.16 - inline Stack(size_t segment_size = default_segment_size(), 1.17 + inline Stack(size_t segment_size = _default_segment_size, 1.18 size_t max_cache_size = 4, size_t max_size = 0); 1.19 inline ~Stack() { clear(true); } 1.20 1.21 @@ -122,8 +127,6 @@ 1.22 // clear_cache is true, also release any cached segments. 1.23 void clear(bool clear_cache = false); 1.24 1.25 - static inline size_t default_segment_size(); 1.26 - 1.27 protected: 1.28 // Each segment includes space for _seg_size elements followed by a link 1.29 // (pointer) to the previous segment; the space is allocated as a single block
2.1 --- a/src/share/vm/utilities/stack.inline.hpp Tue Jul 08 13:52:29 2014 -0400 2.2 +++ b/src/share/vm/utilities/stack.inline.hpp Tue Apr 14 11:40:13 2015 +0200 2.3 @@ -86,14 +86,6 @@ 2.4 } 2.5 2.6 template <class E, MEMFLAGS F> 2.7 -size_t Stack<E, F>::default_segment_size() 2.8 -{ 2.9 - // Number of elements that fit in 4K bytes minus the size of two pointers 2.10 - // (link field and malloc header). 2.11 - return (4096 - 2 * sizeof(E*)) / sizeof(E); 2.12 -} 2.13 - 2.14 -template <class E, MEMFLAGS F> 2.15 size_t Stack<E, F>::adjust_segment_size(size_t seg_size) 2.16 { 2.17 const size_t elem_sz = sizeof(E);