12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_SHARED_TASKQUEUE_INLINE_HPP
26 #define SHARE_VM_GC_SHARED_TASKQUEUE_INLINE_HPP
27
28 #include "gc/shared/taskqueue.hpp"
29 #include "memory/allocation.inline.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/atomic.hpp"
32 #include "runtime/orderAccess.inline.hpp"
33 #include "utilities/debug.hpp"
34 #include "utilities/stack.inline.hpp"
35
36 template <class T, MEMFLAGS F>
37 inline GenericTaskQueueSet<T, F>::GenericTaskQueueSet(int n) : _n(n) {
38 typedef T* GenericTaskQueuePtr;
39 _queues = NEW_C_HEAP_ARRAY(GenericTaskQueuePtr, n, F);
40 for (int i = 0; i < n; i++) {
41 _queues[i] = NULL;
42 }
43 }
44
45 template <class T, MEMFLAGS F>
46 inline GenericTaskQueueSet<T, F>::~GenericTaskQueueSet() {
47 FREE_C_HEAP_ARRAY(T*, _queues);
48 }
49
50 template<class E, MEMFLAGS F, unsigned int N>
51 inline void GenericTaskQueue<E, F, N>::initialize() {
52 _elems = ArrayAllocator<E>::allocate(N, F);
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_SHARED_TASKQUEUE_INLINE_HPP
26 #define SHARE_VM_GC_SHARED_TASKQUEUE_INLINE_HPP
27
28 #include "gc/shared/taskqueue.hpp"
29 #include "memory/allocation.inline.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/atomic.hpp"
32 #include "runtime/orderAccess.hpp"
33 #include "utilities/debug.hpp"
34 #include "utilities/stack.inline.hpp"
35
36 template <class T, MEMFLAGS F>
37 inline GenericTaskQueueSet<T, F>::GenericTaskQueueSet(int n) : _n(n) {
38 typedef T* GenericTaskQueuePtr;
39 _queues = NEW_C_HEAP_ARRAY(GenericTaskQueuePtr, n, F);
40 for (int i = 0; i < n; i++) {
41 _queues[i] = NULL;
42 }
43 }
44
45 template <class T, MEMFLAGS F>
46 inline GenericTaskQueueSet<T, F>::~GenericTaskQueueSet() {
47 FREE_C_HEAP_ARRAY(T*, _queues);
48 }
49
50 template<class E, MEMFLAGS F, unsigned int N>
51 inline void GenericTaskQueue<E, F, N>::initialize() {
52 _elems = ArrayAllocator<E>::allocate(N, F);
|