--- a/src/hotspot/share/gc/z/zArray.inline.hpp Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zArray.inline.hpp Mon Mar 18 11:50:40 2019 +0100
@@ -80,6 +80,17 @@
}
template <typename T>
+inline void ZArray<T>::transfer(ZArray<T>* from) {
+ assert(_array == NULL, "Should be empty");
+ _array = from->_array;
+ _size = from->_size;
+ _capacity = from->_capacity;
+ from->_array = NULL;
+ from->_size = 0;
+ from->_capacity = 0;
+}
+
+template <typename T>
inline void ZArray<T>::clear() {
_size = 0;
}