< prev index next >

src/share/vm/utilities/chunkedList.hpp

Print this page




  56     // with other threads trying to iterate through the lists.
  57   }
  58 
  59   void push(T m) {
  60     assert(!is_full(), "Buffer is full");
  61     *_top = m;
  62     _top++;
  63   }
  64 
  65   void set_next_used(ChunkedList<T, F>* buffer) { _next_used = buffer; }
  66   void set_next_free(ChunkedList<T, F>* buffer) { _next_free = buffer; }
  67 
  68   ChunkedList<T, F>* next_used() const          { return _next_used; }
  69   ChunkedList<T, F>* next_free() const          { return _next_free; }
  70 
  71   size_t size() const {
  72     return pointer_delta(_top, _values, sizeof(T));
  73   }
  74 
  75   T at(size_t i) {
  76     assert(i < size(), err_msg("IOOBE i: " SIZE_FORMAT " size(): " SIZE_FORMAT, i, size()));
  77     return _values[i];
  78   }
  79 };
  80 
  81 #endif // SHARE_VM_UTILITIES_CHUNKED_LIST_HPP


  56     // with other threads trying to iterate through the lists.
  57   }
  58 
  59   void push(T m) {
  60     assert(!is_full(), "Buffer is full");
  61     *_top = m;
  62     _top++;
  63   }
  64 
  65   void set_next_used(ChunkedList<T, F>* buffer) { _next_used = buffer; }
  66   void set_next_free(ChunkedList<T, F>* buffer) { _next_free = buffer; }
  67 
  68   ChunkedList<T, F>* next_used() const          { return _next_used; }
  69   ChunkedList<T, F>* next_free() const          { return _next_free; }
  70 
  71   size_t size() const {
  72     return pointer_delta(_top, _values, sizeof(T));
  73   }
  74 
  75   T at(size_t i) {
  76     assert(i < size(), "IOOBE i: " SIZE_FORMAT " size(): " SIZE_FORMAT, i, size());
  77     return _values[i];
  78   }
  79 };
  80 
  81 #endif // SHARE_VM_UTILITIES_CHUNKED_LIST_HPP
< prev index next >