< prev index next >

src/hotspot/share/memory/metaspace/testHelpers.cpp

Print this page
*** 22,10 ***
--- 22,11 ---
   * questions.
   *
   */
  
  #include "precompiled.hpp"
+ #include "memory/metaspace/metaspaceAlignment.hpp"
  #include "memory/metaspace/metaspaceArena.hpp"
  #include "memory/metaspace/metaspaceArenaGrowthPolicy.hpp"
  #include "memory/metaspace/metaspaceContext.hpp"
  #include "memory/metaspace/testHelpers.hpp"
  #include "runtime/mutexLocker.hpp"

*** 94,11 ***
    const ArenaGrowthPolicy* growth_policy = ArenaGrowthPolicy::policy_for_space_type(type, false);
    Mutex* lock = new Mutex(Monitor::nosafepoint, "MetaspaceTestArea_lock");
    MetaspaceArena* arena = NULL;
    {
      MutexLocker ml(lock,  Mutex::_no_safepoint_check_flag);
!     arena = new MetaspaceArena(_context->cm(), growth_policy, lock, &_used_words_counter, _name);
    }
    return new MetaspaceTestArena(lock, arena);
  }
  
  void MetaspaceTestContext::purge_area() {
--- 95,12 ---
    const ArenaGrowthPolicy* growth_policy = ArenaGrowthPolicy::policy_for_space_type(type, false);
    Mutex* lock = new Mutex(Monitor::nosafepoint, "MetaspaceTestArea_lock");
    MetaspaceArena* arena = NULL;
    {
      MutexLocker ml(lock,  Mutex::_no_safepoint_check_flag);
!     arena = new MetaspaceArena(_context->cm(), growth_policy, MetaspaceMinAlignmentWords,
+                                lock, &_used_words_counter, _name);
    }
    return new MetaspaceTestArena(lock, arena);
  }
  
  void MetaspaceTestContext::purge_area() {
< prev index next >