< prev index next >

src/share/vm/utilities/stack.inline.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 25,34 **** --- 25,35 ---- #ifndef SHARE_VM_UTILITIES_STACK_INLINE_HPP #define SHARE_VM_UTILITIES_STACK_INLINE_HPP #include "utilities/align.hpp" #include "utilities/stack.hpp" + #include "utilities/copy.hpp" template <MEMFLAGS F> StackBase<F>::StackBase(size_t segment_size, size_t max_cache_size, size_t max_size): _seg_size(segment_size), _max_cache_size(max_cache_size),
*** 231,245 **** template <class E, MEMFLAGS F> void Stack<E, F>::zap_segment(E* seg, bool zap_link_field) const { if (!ZapStackSegments) return; const size_t zap_bytes = segment_bytes() - (zap_link_field ? 0 : sizeof(E*)); ! uint32_t* cur = (uint32_t*)seg; ! const uint32_t* end = cur + zap_bytes / sizeof(uint32_t); ! while (cur < end) { ! *cur++ = 0xfadfaded; ! } } #endif template <class E, MEMFLAGS F> E* ResourceStack<E, F>::alloc(size_t bytes) --- 232,242 ---- template <class E, MEMFLAGS F> void Stack<E, F>::zap_segment(E* seg, bool zap_link_field) const { if (!ZapStackSegments) return; const size_t zap_bytes = segment_bytes() - (zap_link_field ? 0 : sizeof(E*)); ! Copy::fill_to_bytes(seg, zap_bytes, badStackSegVal); } #endif template <class E, MEMFLAGS F> E* ResourceStack<E, F>::alloc(size_t bytes)
< prev index next >