RFR (S): 8075288: Remove dictionary NULL check on common path of BlockFreeList methods

Jungwoo Ha jwha at google.com
Thu Apr 30 13:33:14 UTC 2015


>
>
> I agree. This is a nice cleanup, irrespective of any potential performance
> gains.
>
>
> http://cr.openjdk.java.net/~jwha/8079091/webrev.00/src/share/vm/memory/metaspace.cpp.udiff.html
>
> -BlockFreelist::BlockFreelist() : _dictionary(NULL) {}
> +BlockFreelist::BlockFreelist()
> +    : _dictionary(new BlockTreeDictionary()) {
> +  assert(_dictionary != NULL, "Failed to allocate BlockTreeDictionary");
> +}
>
> No need to NULL check CHeapObj allocations, since the JVM will exit if it
> failed to get memory. See AllocateHeap:
>   if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) {
>     vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap");
>   }
>
>
http://cr.openjdk.java.net/~jwha/8079091/webrev.02/

That part is taken care of on webrev.02.
The conversation is also happening at runtime mailing list as Kim suggested
to pass it to runtime.
I think the general agreement is on using webrev.02.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20150430/270006be/attachment.html>


More information about the hotspot-gc-dev mailing list