Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp

本体部(body)

    inline HeapWord* G1AllocRegion::attempt_allocation(size_t word_size,
                                                       bool bot_updates) {

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

      assert(bot_updates == _bot_updates, ar_ext_msg(this, "pre-condition"));

      HeapRegion* alloc_region = _alloc_region;
      assert(alloc_region != NULL, ar_ext_msg(this, "not initialized properly"));

  {- -------------------------------------------
  (1) G1AllocRegion::par_allocate() でメモリ確保を試み, 結果をリターン.
      (なお, 結果に合わせたトレース出力も行う)
      ---------------------------------------- -}

      HeapWord* result = par_allocate(alloc_region, word_size, bot_updates);
      if (result != NULL) {

    {- -------------------------------------------
  (1.1) (トレース出力) 
        ---------------------------------------- -}

        trace("alloc", word_size, result);
        return result;
      }

    {- -------------------------------------------
  (1.1) (トレース出力) 
        ---------------------------------------- -}

      trace("alloc failed", word_size);
      return NULL;
    }

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