comparison src/share/vm/utilities/taskqueue.hpp @ 9073:83f27710f5f7

7197666: java -d64 -version core dumps in a box with lots of memory Summary: Allow task queues to be mmapped instead of malloced on Solaris Reviewed-by: coleenp, jmasa, johnc, tschatzl
author brutisso
date Mon, 08 Apr 2013 07:49:28 +0200
parents 3dfffc8b9722
children ef57c43512d6
comparison
equal deleted inserted replaced
9072:8617e38bb4cb 9073:83f27710f5f7
251 251
252 252
253 253
254 template <class E, MEMFLAGS F, unsigned int N = TASKQUEUE_SIZE> 254 template <class E, MEMFLAGS F, unsigned int N = TASKQUEUE_SIZE>
255 class GenericTaskQueue: public TaskQueueSuper<N, F> { 255 class GenericTaskQueue: public TaskQueueSuper<N, F> {
256 ArrayAllocator<E, F> _array_allocator;
256 protected: 257 protected:
257 typedef typename TaskQueueSuper<N, F>::Age Age; 258 typedef typename TaskQueueSuper<N, F>::Age Age;
258 typedef typename TaskQueueSuper<N, F>::idx_t idx_t; 259 typedef typename TaskQueueSuper<N, F>::idx_t idx_t;
259 260
260 using TaskQueueSuper<N, F>::_bottom; 261 using TaskQueueSuper<N, F>::_bottom;
312 assert(sizeof(Age) == sizeof(size_t), "Depends on this."); 313 assert(sizeof(Age) == sizeof(size_t), "Depends on this.");
313 } 314 }
314 315
315 template<class E, MEMFLAGS F, unsigned int N> 316 template<class E, MEMFLAGS F, unsigned int N>
316 void GenericTaskQueue<E, F, N>::initialize() { 317 void GenericTaskQueue<E, F, N>::initialize() {
317 _elems = NEW_C_HEAP_ARRAY(E, N, F); 318 _elems = _array_allocator.allocate(N);
318 } 319 }
319 320
320 template<class E, MEMFLAGS F, unsigned int N> 321 template<class E, MEMFLAGS F, unsigned int N>
321 void GenericTaskQueue<E, F, N>::oops_do(OopClosure* f) { 322 void GenericTaskQueue<E, F, N>::oops_do(OopClosure* f) {
322 // tty->print_cr("START OopTaskQueue::oops_do"); 323 // tty->print_cr("START OopTaskQueue::oops_do");