Hello, Not sure how often skip is actually used so it might not matter, but this change would increase allocations if skip is called regularly. Not sure if EA can prevent that if it is only medium hot and therefore the callsite is not compiled or inlined?
An alternative would be to make this static and/or allocate lazy (or even share it with more places which need a write-only array?) Gruss Bernd -- http://bernd.eckenfels.net ________________________________ Von: core-libs-dev <[email protected]> im Auftrag von Lance Andersen <[email protected]> Gesendet: Sunday, March 20, 2022 11:51:23 AM An: [email protected] <[email protected]> Betreff: Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai <[email protected]> wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method which is the only place > where it is used as a temporary buffer. > > tier1, tier2, tier3 tests have been run successfully with this change. Hi Jaikiran, This looks fine. Please add the label noreg-trivial to the bug otherwise you will get a ping as there is no test associated with the PR ------------- Marked as reviewed by lancea (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7875
