RFR(XS) 8037959: BitMap::resize frees old map before copying memory if !in_resource_area

Thomas Schatzl thomas.schatzl at oracle.com
Wed Mar 26 11:01:02 UTC 2014


Hi Mikael,

On Wed, 2014-03-26 at 11:03 +0100, Mikael Gerdin wrote:
> Hi,
> 
> I've come up with a solution where I add a reallocate() method to 
> ArrayAllocator and have BitMap use that for growing its backing memory.
> 
> New webrev at: http://cr.openjdk.java.net/~mgerdin/8037959/webrev.1

  looks okay, two minor nits:

- in the test testResizeNonResource(), is it possible to set the
ArrayAllocatorMallocLimit in both cases? Command line flags may set that
to a value that makes the first test equal to the second.

- ArrayAllocator::reallocate should verify that this is indeed a
reallocation and not called incorrectly, i.e. _addr is non-NULL. 

Thanks,
  Thomas



More information about the hotspot-dev mailing list