src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp
changeset 53953 235b0e817c32
parent 52925 9c18c9d839d3
child 59296 9186be5c78ba
--- a/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp	Thu Feb 28 13:53:38 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp	Thu Feb 28 08:44:09 2019 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
@@ -122,6 +122,7 @@
 
   static void initialize_gclab(Thread* thread) {
     assert (thread->is_Java_thread() || thread->is_Worker_thread(), "Only Java and GC worker threads are allowed to get GCLABs");
+    assert(data(thread)->_gclab == NULL, "Only initialize once");
     data(thread)->_gclab = new PLAB(PLAB::min_size());
     data(thread)->_gclab_size = 0;
   }