hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp
changeset 29689 dc72789f83ae
parent 28213 b0bf57cd1e9d
child 29792 8c6fa07f0869
--- a/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Tue Mar 17 14:18:52 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Tue Mar 17 15:53:55 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -226,6 +226,8 @@
   }
 
   assert(obj_ptr != NULL, "when we get here, allocation should have succeeded");
+  assert(_g1h->is_in_reserved(obj_ptr), "Allocated memory should be in the heap");
+
 #ifndef PRODUCT
   // Should this evacuation fail?
   if (_g1h->evacuation_should_fail()) {