--- old/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2009-08-01 04:10:51.986135552 +0100 +++ new/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2009-08-01 04:10:51.908778300 +0100 @@ -2,7 +2,7 @@ #pragma ident "@(#)parMarkBitMap.cpp 1.31 07/10/04 10:49:33 JVM" #endif /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. 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 @@ -44,7 +44,7 @@ const size_t rs_align = page_sz == (size_t) os::vm_page_size() ? 0 : MAX2(page_sz, granularity); - ReservedSpace rs(bytes, rs_align, false); + ReservedSpace rs(bytes, rs_align, rs_align > 0); os::trace_page_sizes("par bitmap", raw_bytes, raw_bytes, page_sz, rs.base(), rs.size()); _virtual_space = new PSVirtualSpace(rs, page_sz); @@ -64,6 +64,8 @@ if (_virtual_space != NULL) { delete _virtual_space; _virtual_space = NULL; + // Release memory reserved in the space. + rs.release(); } return false; }