RFR (M): 8238854: Remove superfluous C heap allocation failure checks

Stefan Johansson stefan.johansson at oracle.com
Wed Feb 12 11:38:47 UTC 2020


Hi Thomas,

> 11 feb. 2020 kl. 14:30 skrev Thomas Schatzl <thomas.schatzl at oracle.com>:
> 
> Hi all,
> 
>  can I have reviews for this change that removes superfluous C heap allocation failure checks (basically hard-exiting the VM) because by default C allocation already exits the VM.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8238854
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8238854/webrev/
Nice cleanup in general, but MemRegion doesn’t derive from CHeapObj and will return NULL on failure: 
void* MemRegion::operator new(size_t size) throw() {
  return (address)AllocateHeap(size, mtGC, CURRENT_PC,
    AllocFailStrategy::RETURN_NULL);
}

So we should either change this to use the default AllocFailStrategy or keep the checks.

Otherwise it looks good,
Stefan

> Testing:
> hs-tier1-5 without differences
> 
> Thanks,
>  Thomas




More information about the hotspot-gc-dev mailing list