< prev index next >

src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 63,72 **** --- 63,73 ---- HeapWord* allocate_noexpand(size_t word_size) { // We assume the heap lock is held here. assert_locked_or_safepoint(Heap_lock); HeapWord* res = object_space()->allocate(word_size); if (res != NULL) { + assert(_start_array.covered_region().contains(MemRegion(res, word_size)), "Allocated beyond end of covered region"); _start_array.allocate_block(res); } return res; }
*** 75,84 **** --- 76,86 ---- // safe for use at the same time as allocate_noexpand()! HeapWord* cas_allocate_noexpand(size_t word_size) { assert(SafepointSynchronize::is_at_safepoint(), "Must only be called at safepoint"); HeapWord* res = object_space()->cas_allocate(word_size); if (res != NULL) { + assert(_start_array.covered_region().contains(MemRegion(res, word_size)), "Allocated beyond end of covered region"); _start_array.allocate_block(res); } return res; }
< prev index next >