equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
224 } |
224 } |
225 } |
225 } |
226 } |
226 } |
227 |
227 |
228 assert(obj_ptr != NULL, "when we get here, allocation should have succeeded"); |
228 assert(obj_ptr != NULL, "when we get here, allocation should have succeeded"); |
|
229 assert(_g1h->is_in_reserved(obj_ptr), "Allocated memory should be in the heap"); |
|
230 |
229 #ifndef PRODUCT |
231 #ifndef PRODUCT |
230 // Should this evacuation fail? |
232 // Should this evacuation fail? |
231 if (_g1h->evacuation_should_fail()) { |
233 if (_g1h->evacuation_should_fail()) { |
232 // Doing this after all the allocation attempts also tests the |
234 // Doing this after all the allocation attempts also tests the |
233 // undo_allocation() method too. |
235 // undo_allocation() method too. |