Top


定義場所(file name)

hotspot/src/share/vm/memory/referenceProcessor.cpp

名前(function name)

  virtual void work(unsigned int work_id) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

        assert(work_id < (unsigned int)_ref_processor.max_num_q(), "Index out-of-bounds");

  {- -------------------------------------------
  (1) 
      ---------------------------------------- -}

        // Simplest first cut: static partitioning.
        int index = work_id;
        // The increment on "index" must correspond to the maximum number of queues
        // (n_queues) with which that ReferenceProcessor was created.  That
        // is because of the "clever" way the discovered references lists were
        // allocated and are indexed into.
        assert(_n_queues == (int) _ref_processor.max_num_q(), "Different number not expected");
        for (int j = 0;
             j < subclasses_of_ref;
             j++, index += _n_queues) {
          _ref_processor.enqueue_discovered_reflist(
            _refs_lists[index], _pending_list_addr);
          _refs_lists[index].set_head(_sentinel_ref);
          _refs_lists[index].set_length(0);
        }
      }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.