RFR (S): 8239070: Memory leak when unsuccessfully mapping in archive regions

Jiangli Zhou jianglizhou at google.com
Fri Feb 14 17:15:23 UTC 2020


Hi Thomas,

Thanks for finding the memory leak. The leak fix probably should be
applied to JDK 11 as well (as a modified backport). I'll try to
request it.

Ioi's suggestion of refactoring region mapping code into a
FileMapInfo::map_heap_data_impl sounds okay to me.

Best regards,
Jiangli

On Fri, Feb 14, 2020 at 7:09 AM Thomas Schatzl
<thomas.schatzl at oracle.com> wrote:
>
> Hi all,
>
>    can I have reviews for this change that plugs a (tiny) memory leak
> when we unsuccessfully map CDS archives into the Java heap?
>
> The FileMapInfo::map_heap_data() method allocates some array of
> MemRegions, and in case we fail to map the archive, we return that
> method without assigning it to something or deallocating that memory.
>
> Found while working on JDK-8238999, also out for review, and depending
> on it.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8239070
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8239070/webrev/
> Testing:
> hs-tier1-4
>
> Thanks,
>    Thomas



More information about the hotspot-gc-dev mailing list